نظرة عامة على المستودع
يوضح هذا المستودع تكامل CHROMA DB ، قاعدة بيانات متجه ، مع نماذج تضمين لتطوير نظام توليد متزايد قوي للاسترجاع (RAG).
تضمين خيارات النموذج
إعادة تكامل REANDER (HTTP ، GRPC)
لتعزيز دقة RACT ، يمكننا دمج نماذج REANDERS Huggingface. تقوم هذه النماذج بتقييم التشابه بين نتائج الاستعلام والاستعلام المستردة من Vectordb ، وترتبت إعادة رتبة النتائج عن طريق الفهرس لضمان أن المعلومات المستردة ذات صلة ودقيقة في السياق.
Example:
query := " What is Deep Learning? "
retrievedResults := []string{ " Tomatos are fruits... " , " Deep Learning is not... " , " Deep learning is... " }
Response: [{ " index " :2, " score " :0.9987814},{ " index " :1, " score " :0.022949383},{ " index " :0, " score " :0.000076250595}]يوضح هذا المستودع كيفية الجمع بين التضمين وإعادة تنمية نظام خرقة.
إعداد قاعدة بيانات المتجهات :
وثائق المعالجة المسبقة :
التضمينات المتجر :
معالجة الاستعلام :
الاندماج مع مزود LLM :
إنشاء قالب موجه :
العملية مع LLM :
يسمح ذلك بتحسين مهام معالجة اللغة عن طريق الاستفادة من قوة قواعد بيانات المتجهات ونماذج التضمين المتقدمة.
<|user|> what is mirostat_tau?</s>:-
Based on the provided content, I can answer your query.
** Query Result: ** Mirostat_tau Controls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text. (Default: 5.0)
** Document Content: **
mirostat_tau Controls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text. (Default: 5.0)
float
mirostat_tau 5.0
** Additional Information on this Topic: **
Here are three main points related to Mirostat_tau:
1. ** Coherence vs Diversity: ** Mirostat_tau controls the balance between coherence and diversity of the output, which means it determines how focused or creative the generated text will be.
2. ** Lower Values Mean More Focus: ** A lower value for mirostat_tau results in more focused and coherent text, while a higher value allows for more diverse and potentially less coherent output.
3. ** Default Value: ** The default value for Mirostat_tau is 5.0, which means that if no specific value is provided, the model will generate text with a balance between coherence and diversity.
Please note that these points are based solely on the provided content and do not go beyond it.% git clone https://github.com/yourusername/chroma-db.git
cd chroma-dbgo build -o chroma-db cmd/main.go تأكد من تثبيت Docker و Docker Compose. استخدم docker-compose.yaml لإعداد خدمة Chroma DB.
docker-compose up -d./chroma-db
Usage
-load
Load and embed the data in vectordb
Provide the path to file Eg: " test/model_params.txt "
-query
Query the embedded data and rerank the results
Provide the query Eg: " what is the difference between mirostat_tau and mirostat_eta? " CMD/ :
داخلي/ ثوابت/ :
Docker-corm.yaml : Docker Compose Configuration File لإعداد خدمة Chroma DB.
ضبط قيم التكوين في internal/constants/constants.go لتناسب احتياجاتك. وهذا يشمل إعدادات مثل:
Chroma DB URL ، اسم المستأجر ، قاعدة البيانات ومساحة الاسم. نوع نموذج Ollama وعنوان URL.
< | system | > {{ . SystemPrompt }} < / s >
< | content | > {{ . Content }} < / s >
< | user | > {{ . Prompt }} < / s > ابدأ Vectordb مع الأمر التالي:
docker compose upتنفيذ العمليات المتعلقة بالدردشة:
go run ./cmd/main.go يتم توفير قيم التكوين الافتراضية في internal/constants/constants.go ويمكن تعديلها حسب احتياجاتك. بعض هذه تشمل:
ChromaUrl ، TenantName ، Database ، NamespaceOllamaModel و OllamaUrlتم ترخيص هذا المشروع بموجب ترخيص BSD المكون من 3 نقاط - راجع ملف الترخيص للحصول على التفاصيل.
لأي مشكلات أو مساهمات ، يرجى فتح مشكلة أو إرسال طلب سحب على Github.