RAG Pipeline
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.
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
Explore this workflow and its measured results
The interactive DAG, version and execution summary below come directly from the public Hub publication.
Import this exact version and download the research data
In Desktop, choose Create workflow → Import from Hub and paste this immutable URI:
akoflow://hub/publications/f00526cb-8aa2-4bcf-b28d-8d76c47588fb/versions/1
Run this example locally
Build a local lexical retrieval index over the bundled text corpus, answer questions by retrieving source evidence, and check the answers against versioned known-answer tests. No hosted embedding or LLM service is required.
Install Go and Python 3.12 or newer.
git clone https://github.com/UFFeScience/akoflow-examples.git &&
cd akoflow-examples &&
git checkout --detach showcase-hub-v1 &&
cd generative-ai/local-rag &&
./prepare.sh &&
./run.sh
Run the block from the directory where you keep your repositories. If you already cloned the repository, enter this example's directory and run ./prepare.sh && ./run.sh.
Preparation downloads the Go module and any declared Python packages once. The workload then runs locally with offline input data. Every meaningful step is a separate process; independent activities run in parallel after their dependencies complete.
Read outputs/manifest.json for the generated artifacts, outputs/dag-validation.json for dependency waves, and outputs/stage-<activity>.json for each activity's observed result. A failed stage stops the run and prevents a successful final manifest.
Expected outputs: documents.json, chunks.json, index.json, retrieval.json, answers.json, evaluation.json.
Run the same activities in Desktop
Start your local AkôFlow daemon with Docker available and configure AKOFLOW_API_TOKEN in your shell. From this example's directory, run:
go run ../../tools/daemon-local -root ../.. -example generative-ai/local-rag
This command validates the daemon connection, builds the declared image, registers the local environment and workflow, and submits a real run. The daemon owns execution and file transfers. Open the printed run ID in Desktop to inspect each activity.
Execution evidence
Latest validated Docker execution: 6 / 6 activities completed. Open the measured run, logs, metrics and output downloads in Hub. The documentation screenshots below are historical reference captures; they are separate from the latest Hub execution.
Read the historical documentation execution record · Local output manifest
Each stage also ran through the standalone local command. Read the dependency and artifact validation.
ingest
After: workflow start.
chunk
After: ingest.
index
After: chunk.
retrieve
After: index.
answer
After: retrieve.
evaluate
After: answer.