저장소 개요
이 저장소는 벡터 데이터베이스 인 Chroma DB의 통합을 보여 주며, 밀접한 검색 증강 생성 (RAG) 시스템을 개발하기위한 모델 임베딩 모델을 보여줍니다.
모델 옵션 임베딩
재 랭커 통합 (HTTP, GRPC)
Rag의 정확성을 높이기 위해 Huggingface Re-Rankers 모델을 통합 할 수 있습니다. 이러한 모델은 vectordb에서 RECERED와 쿼리 결과 사이의 유사성을 평가하고, 검색된 정보가 관련성이 높고 상황에 맞는 정확한 인덱스별로 결과를 순위에 올랐습니다.
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-compose.yaml : Chroma DB 서비스를 설정하기위한 Docker Compose 구성 파일.
internal/constants/constants.go 에서 구성 값을 조정하여 필요에 맞게 조정하십시오. 여기에는 다음과 같은 설정이 포함됩니다.
Chroma DB URL, 테넌트 이름, 데이터베이스 및 네임 스페이스. 올라마 모델 유형 및 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 -Clause 라이센스에 따라 라이센스가 부여됩니다. 자세한 내용은 라이센스 파일을 참조하십시오.
문제 나 기여에 대해서는 문제를 열거나 GitHub에 풀 요청을 제출하십시오.