Repository -Übersicht
Dieses Repository demonstriert die Integration von Chroma DB, einer Vektor -Datenbank, mit Einbettungsmodellen, um ein RA -System (Robust Abruf Augmented Generation) zu entwickeln.
Modelloptionen einbetten
Re-Ranker-Integration (HTTP, GRPC)
Um die Genauigkeit von RAG zu verbessern, können wir die Modelle von Umarmungsface-Reankern einbeziehen. Diese Modelle bewerten die Ähnlichkeit zwischen einer Abfrage- und Abfrageergebnisse, die von VectordB retribiert werden, und bewerten Sie die Ergebnisse nach Index, um sicherzustellen, dass abgerufene Informationen relevant und kontextuell genau sind.
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}]Dieses Repository zeigt, wie ein Einbettung und Wiederaufbau eines Lappensystems kombiniert werden kann.
Richten Sie die Vektordatenbank ein :
Vorverarbeitungsdokumente :
Geschäfte Einbettungen :
Abfrageverarbeitung :
Integrieren Sie sich in den LLM -Anbieter :
Erstellen Sie eine schnelle Vorlage :
Prozess mit LLM :
Dies ermöglicht die Verbesserung der Sprachverarbeitungsaufgaben, indem die Leistung von Vektordatenbanken und erweiterte Einbettungsmodelle nutzt.
<|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 Stellen Sie sicher, dass Docker und Docker Compose installiert sind. Verwenden Sie die docker-compose.yaml , um den Chroma DB-Dienst einzurichten.
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/ :
intern/ konstanten/ :
Docker-compose.yaml : Docker-Konfigurationsdatei zum Einrichten des Chroma DB-Dienstes.
Passen Sie die Konfigurationswerte in internal/constants/constants.go . Dies beinhaltet Einstellungen wie:
Chroma DB URL, Mietername, Datenbank und Namespace. Ollama -Modelltyp und URL.
< | system | > {{ . SystemPrompt }} < / s >
< | content | > {{ . Content }} < / s >
< | user | > {{ . Prompt }} < / s > Starten Sie das VectordB mit dem folgenden Befehl:
docker compose upAusführen von Chat-bezogenen Operationen:
go run ./cmd/main.go Standardkonfigurationswerte werden in internal/constants/constants.go bereitgestellt und können nach Ihren Anforderungen eingestellt werden. Einige davon sind:
ChromaUrl , TenantName , Database , NamespaceOllamaModel und OllamaUrlDieses Projekt ist unter der BSD 3 -Klausel -Lizenz lizenziert - Einzelheiten finden Sie in der Lizenzdatei.
Für Probleme oder Beiträge eröffnen Sie bitte ein Problem oder senden Sie eine Pull -Anfrage bei GitHub.