Skip to main content

Local RAG Factory

The workflow normalizes a local Markdown corpus, creates chunks, builds a hashed TF-IDF index, retrieves evidence, generates extractive answers with citations, and evaluates grounding. Its deterministic implementation makes retrieval behavior inspectable before an optional Ollama adapter is introduced.

Local RAG Factory

Inputs

  • Versioned Markdown corpus
  • Questions with expected evidence

Outputs

  • Normalized documents and chunks
  • Vector index
  • Ranked retrieval results
  • Cited answers
  • Grounded-accuracy report

Provenance to preserve

  • Document SHA-256 values
  • Chunk identifiers
  • Retrieval scores
  • Answer citations and evaluation result

Run locally​

git clone https://github.com/UFFeScience/akoflow-examples.git
cd akoflow-examples/generative-ai/local-rag
./run.sh

Execution is offline and uses only Python's standard library. The activity boundaries remain suitable for replacing the deterministic answer stage with a local Ollama model.

Open the source bundle · Workflow YAML