Chat is stateless. Ragrails does not persist conversations. Pass
history into each turn and store the returned history wherever your application keeps session state.Basic chat
Streaming
chat_stream() yields progress events, token events, error events, and one final event containing the same ChatResult shape.
Conversation features
Query rewriting
Use query rewriting when follow-up questions need previous context to search correctly.Reranked chat
Reranking retrieves a wider candidate set, reorders it, and keeps the top reranked chunks for answer generation.Retrieval quality
Retrieval quality decides how chat behaves when the retrieved context is weak.Possible errors
Most stage-level failures are returned in the resulterrors list instead of raising immediately. REST validation and setup failures may return an exception envelope instead. See Errors for the shared shapes.
Next steps
- Use Retrieval when you want chunks without answer generation.
- Use Pipeline Overview to see how chat fits into the full RAG flow.
- Use Chat Tuning for deeper quality and prompt behavior.

