Build a knowledge base, query it, and chat from Python.
This quickstart creates a small support knowledge base, stores it in Qdrant, retrieves the matching chunk, and asks an LLM for a grounded answer. It uses inline Markdown for the first smoke test, then shows the same SDK workflow with documents, websites, and REST API sources.
ingest() runs extraction, chunking, embedding, and storage.
ingested = rag.ingest( markdown=( "# Refund policy\n\n" "Customers can request a refund within 30 days of purchase. " "Refunds are returned to the original payment method within 5 business days." ),)print({ "sources": ingested.sources, "chunks": ingested.chunks, "embedded": ingested.embedded, "stored": ingested.stored, "failed": ingested.failed,})
Use the same ingest workflow with other source types: