Ragex.RAG.Pipeline
(Ragex v0.8.0)
View Source
Orchestrates the RAG pipeline: Retrieval → Augmentation → Generation.
Pipeline Steps
- Retrieval: Query knowledge graph and vector store (hybrid search)
- Context Building: Format retrieved code for AI consumption
- Prompt Engineering: Apply templates and inject context
- Generation: Call AI provider with augmented prompt
- Post-processing: Parse response, add sources, format output
Summary
Functions
Explain code using RAG.
Execute RAG query pipeline.
Explain code using RAG with streaming response.
Execute RAG query pipeline with streaming response.
Suggest improvements using RAG with streaming response.
Suggest improvements using RAG.
Functions
Explain code using RAG.
Execute RAG query pipeline.
Options
:limit- Max retrieval results (default: 10):threshold- Similarity threshold (default: 0.7):strategy- Retrieval strategy: :fusion, :semantic_first, :graph_first:include_code- Include full code snippets (default: true):provider- Override AI provider:system_prompt- Custom system prompt:temperature- AI temperature (default: 0.7):format- Context format: :text, :json, :ast (default: :text):response_format- AI response format: nil or :json (default: nil)
Explain code using RAG with streaming response.
Execute RAG query pipeline with streaming response.
Returns {:ok, stream} where stream emits chunks as they arrive from the AI provider.
The final chunk will include usage statistics and sources.
Options
Same as query/2 plus:
:stream_metadata- Include sources in every chunk (default: false)
Suggest improvements using RAG with streaming response.
Suggest improvements using RAG.