Plan-conditioned RAG over the open web
When you need the graph and keywords as first-class fields to feed a downstream system, slorg hands them back as a structured object rather than burying them.
The problem
A naive web-RAG pipeline throws the raw prompt at a search engine and stuffs whatever returns into a context window. The retrieval is unconditioned on any understanding of the query, and the pipeline gives you no structured handle on why those documents were chosen.
With slorg
slorg conditions retrieval on a plan: it drafts, builds a graph, and derives keywords from the graph before searching. The response exposes the graph, the keywords, and content-extracted, scored results — ready to ingest into a vector store or use as grounding for a downstream LLM call.
How it flows
- search() — Call LorgSearch.search() with the user query and a result limit.
- results[] — Take the content-extracted, 0–1-scored results array for grounding.
- knowledgeGraph — Use the returned graph and keywords as structured metadata.
- Ingest — Feed the top-scored results into your vector store or context window.
What you get
- Retrieval conditioned on a structured plan
- Graph + keywords available as real fields
- Scored, content-extracted results ready for grounding
try it
Install with
npm install lorg and follow the
quickstart, or read how the pipeline works on the
architecture page.