rag.query() for the workflow-level API and rag.retrieve() when you want direct control over retrieval objects.
Workflow Retrieval: query()
query() returns query, search_query, retrieved, items, failed, and errors.
Direct Retrieval: retrieve()
id, chunk_id, score, text, metadata, and optional rerank_score.
Reranking
Retrieve more candidates than you show, then rerank down to the best few.Query Rewriting
Query rewriting turns follow-up questions into standalone search queries. It requires an LLM.Parameters
Query
Use retrieval in the query workflow.
Chat
Generate answers from retrieved context.

