-
Notifications
You must be signed in to change notification settings - Fork 2
RAG
Benmebrouk edited this page Apr 12, 2026
·
1 revision
Upload documents, then ask questions. Every answer is verified against the sources.
result = client.rag_upload(
content="Our refund policy allows returns within 60 days...",
filename="policy.txt",
)
print(result.document_id) # "user::abc-def-..."
print(result.chunks_count) # 3result = client.rag_query("What is the refund policy?")
print(result.answer)
print(result.sources)
print(result.get_confidence()) # 0.0 to 1.0answer = client.rag_ask(
question="What are the payment terms?",
text="Payment is due within 30 days of invoice..."
)Plain text, Markdown, JSON, YAML, CSV via rag_upload(). PDF, DOCX, images via upload_file().