Tinjauan Repositori
Repositori ini menunjukkan integrasi Chroma DB, database vektor, dengan model embedding untuk mengembangkan sistem pengambilan augmented generasi (RAG) yang kuat.
Opsi Model Menyematkan
Integrasi Re-Ranker (HTTP, GRPC)
Untuk meningkatkan keakuratan kain, kita dapat menggabungkan model peringkat pelukan. Model-model ini mengevaluasi kesamaan antara hasil kueri dan kueri yang diambil dari VectorBB, peringkat ulang memberi peringkat hasil dengan indeks memastikan bahwa informasi yang diambil relevan dan akurat secara kontekstual.
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}]Repositori ini menunjukkan cara menggabungkan embedding dan reranking untuk mengembangkan sistem kain.
Mengatur database vektor :
Dokumen Preprocess :
Toko Embeddings :
Pemrosesan Permintaan :
Integrasi dengan penyedia LLM :
Buat template prompt :
Proses dengan LLM :
Hal ini memungkinkan untuk meningkatkan tugas pemrosesan bahasa dengan memanfaatkan kekuatan database vektor dan model embedding canggih.
<|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 Pastikan Docker dan Docker Compose dipasang. Gunakan docker-compose.yaml untuk mengatur layanan 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/ :
internal/ konstanta/ :
Docker-Compose.YAML : Docker Compose Configuration File untuk Menyiapkan Layanan Chroma DB.
Sesuaikan nilai konfigurasi dalam internal/constants/constants.go agar sesuai dengan kebutuhan Anda. Ini termasuk pengaturan seperti:
Chroma DB URL, Nama Penyewa, Database & Namespace. Jenis dan URL model Ollama.
< | system | > {{ . SystemPrompt }} < / s >
< | content | > {{ . Content }} < / s >
< | user | > {{ . Prompt }} < / s > Mulai VectorDB dengan perintah berikut:
docker compose upJalankan Operasi Terkait Obrolan:
go run ./cmd/main.go Nilai konfigurasi default disediakan dalam internal/constants/constants.go dan dapat disesuaikan sesuai kebutuhan Anda. Beberapa di antaranya termasuk:
ChromaUrl , TenantName , Database , NamespaceOllamaModel dan OllamaUrlProyek ini dilisensikan di bawah lisensi BSD 3 -Clause - lihat file lisensi untuk detailnya.
Untuk masalah atau kontribusi apa pun, buka masalah atau kirimkan permintaan tarik di GitHub.