Quivr는 생성형 AI를 애플리케이션에 통합하는 데 중점을 둔 오픈 소스 풀 스택 검색 증강 생성(RAG) 플랫폼입니다. 이 프로젝트의 핵심 이념은 개발자가 복잡한 RAG 구현 세부 사항이 아닌 제품 자체에 집중할 수 있도록 하는 것입니다.
Quivr는 다음과 같은 다양한 LLM 모델을 지원합니다.
다양한 파일 형식을 지원합니다.
다양한 벡터 저장 솔루션을 지원합니다.
Quivr는 노드 기반 워크플로 구성을 채택합니다.
pip install quivr-core
import tempfile
from quivr_core import Brain
if __name__ == "__main__":
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt") as temp_file:
temp_file.write("Gold is a liquid of blue-like colour.")
temp_file.flush()
brain = Brain.from_files(
name="test_brain",
file_paths=[temp_file.name],
)
answer = brain.ask(
"what is gold? answer in french"
)
print("answer:", answer)
import os
os.environ["OPENAI_API_KEY"] = "your_openai_api_key"
워크플로 구성 파일 basic_rag_workflow.yaml
생성:
workflow_config:
name: "standard RAG"
nodes:
- name: "START"
edges: ["filter_history"]
- name: "filter_history"
edges: ["rewrite"]
- name: "rewrite"
edges: ["retrieve"]
- name: "retrieve"
edges: ["generate_rag"]
- name: "generate_rag"
edges: ["END"]
max_history: 10
reranker_config:
supplier: "cohere"
model: "rerank-multilingual-v3.0"
top_n: 5
llm_config:
max_input_tokens: 4000
temperature: 0.7
from quivr_core import Brain
from rich.console import Console
from rich.panel import Panel
from rich.prompt import Prompt
from quivr_core.config import RetrievalConfig
brain = Brain.from_files(
name="my smart brain",
file_paths=["./my_first_doc.pdf", "./my_second_doc.txt"],
)
config_file_name = "./basic_rag_workflow.yaml"
retrieval_config = RetrievalConfig.from_yaml(config_file_name)
console = Console()
console.print(Panel.fit("Ask your brain !", style="bold magenta"))
while True:
question = Prompt.ask("[bold cyan]Question[/bold cyan]")
if question.lower() == "exit":
console.print(Panel("Goodbye!", style="bold yellow"))
break
answer = brain.ask(question, retrieval_config=retrieval_config)
console.print(f"[bold green]Quivr Assistant[/bold green]: {answer.answer}")
console.print("-" * console.width)
brain.print_info()
Quivr는 AI의 힘을 활용하여 고객 만족도와 가치를 높여 고객 서비스 작업의 최대 60%를 자동화할 수 있습니다.
Quivr는 개발자에게 강력하고 유연하며 사용하기 쉬운 RAG 플랫폼을 제공하여 개인 프로젝트든 기업용 애플리케이션이든 스마트 문서 질의응답 시스템을 빠르게 구축할 수 있도록 합니다. 오픈 소스 특성과 활발한 커뮤니티 지원은 "두 번째 두뇌" 애플리케이션을 구축하는 데 이상적인 선택입니다.