Обзор репозитория
Этот репозиторий демонстрирует интеграцию Croma DB, векторной базы данных, с внедрением моделей для разработки надежной системы извлечения дополненного генерации (RAG).
Встроенные параметры модели
Повторная интеграция (HTTP, GRPC)
Чтобы повысить точность тряпки, мы можем включить модели uggingface re-rankers. Эти модели оценивают сходство между запросом и результатами запроса, возвращенными от 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}]Этот репозиторий демонстрирует, как комбинировать встраивание и реэнергирование для разработки тряпичной системы.
Настройка векторной базы данных :
Предварительные документы :
Магазин Entgeddings :
Обработка запросов :
Интегрируйте с поставщиком 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-compose.yaml : Docker Compose Configuration File для настройки службы Chroma DB.
Регулируйте значения конфигурации во internal/constants/constants.go чтобы соответствовать вашим потребностям. Это включает в себя настройки, такие как:
URL Croma DB, имя арендатора, база данных и пространство имен. Оллама тип модели и 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 -CRAUSE - для получения подробной информации см. Файл лицензии.
По любым вопросам или взносам, пожалуйста, откройте проблему или отправьте запрос на привлечение на GitHub.