Plan, retrieve, rank — every step visible.
slorg isn't an agent that guesses which tool to call. It runs the same fixed pipeline every time and hands back every intermediate artifact: the draft, the graph, the keywords, and the per-result score.
slorg spends its first move on the model, not on Google — so retrieval is conditioned on a structured plan.
Plan-first draft answer
Every query starts with GPT writing a first-pass answer from training data alone, before any web access. That draft is the seed the rest of the pipeline plans around.
Knowledge-graph extraction
Entities and relationships are pulled out of the draft answer into a typed knowledge graph. The graph — not the raw prompt — becomes the basis for what to search.
Graph-derived keywords
Search terms are derived from the graph nodes rather than the user prompt directly. The keywords reflect the plan, so the web query is aimed rather than literal.
A fixed retrieval sweep across multiple open-web engines, then content extraction — no runtime tool choice.
Multi-engine SearxNG search
The graph-derived keywords are sent through SearxNG to Google, Bing, Yahoo, and DuckDuckGo by default. Engines and result limit are configurable via env vars.
Content fetch + extraction
Each candidate URL is fetched and its readable content extracted, so downstream scoring and grounding work on real page text, not just titles and snippets.
A final scoring pass grades every result against the original question, and the response exposes every intermediate artifact.
0–1 relevance scoring
GPT scores each fetched result from 0 to 1 against the original query. Ranking is an explicit, inspectable step — not a hidden reranker.
Structured, inspectable response
The response object exposes the draft answer, the knowledge graph, the derived keywords, the scored results, and the token count — the whole plan is a first-class field, not a black box.
OpenAI-compatible CLI, library, and REST
Run slorg as a CLI (lorg), embed it as a Node library (LorgSearch), or serve it over REST. Point it at any OpenAI-compatible endpoint via OPENAI_BASE_URL.
See the full pipeline on the architecture page, or try it in the quickstart.