Work with pipeline
Use pipeline when you need to orchestrate retrieval, prompt assembly, and llm generation in a single ragpipeline.run() call — returns ragresult with the answer and citationrecord provenance.
Prerequisites
- Access to the project source code
- Familiarity with the files under src/attune_rag/pipeline.py
Steps
-
Understand the class hierarchy. Read the interfaces to see how pipeline is structured before extending or modifying. The key classes are:
RagResultinsrc/attune_rag/pipeline.py— Output ofRagPipeline.run.RagPipelineinsrc/attune_rag/pipeline.py— LLM-agnostic RAG pipeline.
-
Decide whether to extend or modify. If the class has subclasses, extend with a new one rather than changing the base. If it stands alone, modify directly.
-
Make your change. Follow existing patterns — naming, error handling, and logging style.
-
Run the related tests. Target with
pytest -k "pipeline".
Key files
src/attune_rag/pipeline.pysrc/attune_rag/__init__.py
Common modifications
Classes you are most likely to extend:
RagResultinsrc/attune_rag/pipeline.pyRagPipelineinsrc/attune_rag/pipeline.py