query
Takes the user question off the wire as a typed Query@1.
IN PRACTICE / RAG
A retrieval pipeline is a chain of effectful calls wrapped around pure ranking.
Read the manifest
THE ARCHITECTURE
bloccs scopes each model and database call to its own node, keeps the ranking pure and replayable, and puts the decision gate in the graph itself — so approved drafts and requests for review take explicit routes. Because every effect is a declared capability, you can see exactly which nodes reach the model, the vector store, or take an action.
Where this stands today: retrieval over the DB effect, the routing in gate, and every outbound call are shipped in 0.8. The model calls (embed, generate) ride the generic HTTP effect for now, and gate branches on a decision in the message — a first-class model effect and a gate that suspends for live human approval are on the roadmap.
SOURCE OF TRUTH
The network is declared in TOML. Compile it with its referenced node manifests and bloccs checks the wiring, schemas, and capabilities before emitting a Broadway supervision tree.
mix bloccs.compile
Node implementations live in the referenced nodes/*.bloccs files.
[network]
id = "rag"
version = "0.1.0"
runtime = "beam"
[nodes]
query = { use = "nodes/query.bloccs" }
embed = { use = "nodes/embed.bloccs" }
retrieve = { use = "nodes/retrieve.bloccs" }
rerank = { use = "nodes/rerank.bloccs" }
generate = { use = "nodes/generate.bloccs" }
gate = { use = "nodes/gate.bloccs" }
[[edges]]
from = "query.asked"
to = "embed.text"
[[edges]]
from = "embed.vector"
to = "retrieve.query"
[[edges]]
from = "retrieve.chunks"
to = "rerank.chunks"
[[edges]]
from = "rerank.ranked"
to = "generate.context"
[[edges]]
from = "generate.draft"
to = "gate.candidate"
[expose]
in = { ask = "query.asked" }
out = { act = "gate.approved", review = "gate.held" }
[supervision]
strategy = "one_for_one"
max_restarts = 10
max_seconds = 60
[deploy]
concurrency = { embed = 4, generate = 2 }
The kind describes its role. The capability declares its reach.
Takes the user question off the wire as a typed Query@1.
Calls the embedding model. Today that's the generic HTTP effect; a first-class model capability is on the roadmap.
Vector search over your store via the DB effect, emitting candidate Chunk@1s.
Reorders candidates by relevance. Pure scoring — no I/O, fully replayable in tests.
Calls the LLM with the ranked context over the HTTP effect to draft an answer.
Routes the draft to act or hold for review. Today it branches on a decision already in the message; suspending for a live human approval is on the roadmap.
KEEP EXPLORING
Declare the graph. Check the contracts. Let the BEAM run it.
Read the docs{:bloccs, "~> 0.9"}
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect