#5092·kedro

Stateful session support for RAG-based use cases

Author: ElenaKhaustovaCreated Sep 8, 2025Updated Sep 28, 2026
LabelsIssue: Feature Request

Description

In agentic and RAG-based workflows, we often rely on shared resources such as embeddings, FAISS indexes, or knowledge base lookups. Currently, batch-oriented Kedro pipelines re-create these resources on every run, which leads to unnecessary compute and inefficiency.

The goal of this ticket is to explore whether Kedro should provide stateful session support (or another solution) that enables caching and reusing shared knowledge resources across multiple runs, especially in interactive or agentic workflows.

Context

  • Session Limitations Today
    • Every kedro run spawns a fresh pipeline execution.
    • This causes repeated database writes, embedding jobs, and model calls even when inputs are unchanged.
  • Problem in RAG Use Cases
    • Loading embeddings into a FAISS index at the start of every run is wasteful.
    • Agents handling user queries at random times need to:
    • Maintain context across sessions.
    • Reuse shared knowledge resources like indexes and preprocessed KBs.
  • Examples
  • Load embeddings once → reuse FAISS index across multiple queries.
  • Maintain a long-lived knowledge base or vector store across agent sessions without recomputation.

Acceptance Criteria

  • Clear recommendation on whether stateful sessions should be part of Kedro.
  • If yes, provide a reference implementation (e.g., caching FAISS index across runs).
  • Documentation with examples:
    • RAG workflow with resource reuse.
    • Multi-turn agent session that holds state without recomputation.