WeKnora: grounded answers, scoped memory and deliberate operations
WeKnora RAG architecture: events, shared state, retrieval stages and resumable output
Follow the documented plugin pipeline without confusing internal stage completion, SSE delivery and source-supported answer quality.
What you will learn
- The pipeline is assembled for the request
- Keep intermediate results visible
- Streaming is a delivery layer
Before you start
- Basic HTTP and container concepts
- Understanding of documents, passages and model providers
Separate ingestion, retrieval, answer support and memory scope, then design an evidence-based acceptance exercise.
Key takeaways
- Request features determine the stage sequence.
- Search, rerank and merged context are useful separate checkpoints.
- Resuming output does not establish exactly-once external actions.
The pipeline is assembled for the request
The architecture guide describes an event manager whose plugins handle registered event types. A request without knowledge bases or web search can take a chat path; a RAG request adds question understanding, parallel retrieval, reranking, merging, top-k filtering and context assembly before generation. Optional stages depend on request features.
Within one event, registration order determines the nested next-call chain. A plugin can work before or after calling next. Consequently, reading a flat list of plugin names is insufficient to infer every pre- and post-processing relationship. The guide specifically describes Wiki weighting in relation to reranking.
Keep intermediate results visible
ChatManage separates request configuration, intermediate pipeline state and runtime handles. SearchResult, RerankResult and MergeResult represent different checkpoints. Inspecting them helps distinguish no candidate, poor ranking, lost context and unsupported generation. They are not interchangeable copies of one final answer.
The guide describes cloning for parallel retrieval without cloning runtime context. That is a documented design boundary, not a concurrency proof from this series. Likewise, an empty search fallback may produce model text; it must not be presented as knowledge-base evidence merely because it reaches the same chat interface.
Streaming is a delivery layer
Results travel through a per-request event bus, stream handler and stream manager before SSE delivery. The guide describes memory or Redis storage and reconnect continuation. A distributed deployment still needs the matching shared-stream configuration; resumable output is not a promise of exactly-once tool side effects.
Cancellation and empty retrieval require different outcomes. The guide places cancellation checks before no-result fallback, and publishes references before completion streaming. Keep delivery progress, source references and final acceptance separate in diagnostics. We inspected documentation but did not exercise reconnects or multi-replica behavior.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Map the request’s enabled stages.
- 2
Inspect intermediate retrieval results.
- 3
Trace references and answer events separately.
- 4
Test cancellation and reconnect on a controlled deployment.
Copy-ready example
{
"pipelineWorksheet": true,
"searchResult": null,
"rerankResult": null,
"mergedContext": null,
"deliveryResumed": null,
"claimSupported": null,
"distributedTestExecuted": false
}Frequently asked questions
Is every request forced through the same RAG stages?
No. The documented builder assembles stages according to request features.
Does SSE reconnection prove the answer is correct?
No. Delivery continuity and evidence quality are different properties.
Sources
- WeKnora / website-docs/02-architecture/04-rag-pipeline.mdSource checked 2026-09-14
- WeKnora / README.mdSource checked 2026-09-14