Retrieval-augmented generation is only as good as its retrieval. If your RAG system only knows your vector store, it cannot answer anything that happened after your last ingest. ODEN adds the live web as a retrieval source in one call — and returns clean, context-ready text instead of HTML you have to scrape and strip.
The problem ODEN solves in RAG#
A typical web-RAG step is a pipeline: search for links, fetch each page, strip boilerplate, chunk it, embed it, rank it, then build context. That is a lot of moving parts, latency and tokens. ODEN collapses it: one request returns a synthesized answer plus ranked, citation-backed passages, already distilled.
Minimal web-RAG with ODEN#
Retrieve with ODEN, then let your model answer from the retrieved context and cite it:
import os, requests
from openai import OpenAI # or anthropic, or any model client
client = OpenAI()
def oden_retrieve(query: str) -> dict:
r = requests.post(
"https://api.oden-api.com/search",
headers={"Authorization": f"Bearer {os.environ['ODEN_KEY']}"},
json={"query": query, "include_snippets": True},
timeout=30,
)
r.raise_for_status()
return r.json()["results"]
def answer(question: str) -> str:
r = oden_retrieve(question)
context = "\n".join(
f"[{i+1}] {c['title']} ({c['url']}): {c.get('snippet','')}"
for i, c in enumerate(r["citations"])
)
prompt = (
f"Answer the question using only the sources below. Cite them inline as [n].\n\n"
f"Sources:\n{context}\n\nQuestion: {question}"
)
resp = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": prompt}],
)
return resp.choices[0].message.content
print(answer("What changed in the EU AI Act enforcement timeline this year?"))
Why this is less code than it looks#
- No fetch-and-parse step. ODEN reads the sources and returns passages, so there is no HTML pipeline to maintain.
- Citations come for free. Each passage carries its
urlandtitle, so your model can attribute every claim. - Freshness is the default. ODEN searches the live web on each call, so there is no re-ingest cadence to worry about for time-sensitive questions.
Combining with your vector store#
ODEN complements a vector store rather than replacing it. A common pattern: query your private store for internal knowledge, query ODEN for anything public or time-sensitive, then merge both into the prompt. Use depth: "basic" for cheap breadth and advanced when answer quality matters.
FAQ#
Do I still need a vector database with ODEN?#
For your own private documents, yes — ODEN searches the public web, not your internal data. Use both: your vector store for private knowledge, ODEN for live public knowledge.
How do I keep RAG context small?#
Threshold on score (drop citations below ~0.6), request include_snippets for one-sentence passages, and pass only the top few citations. See answers and citations.
Does ODEN embed text for me?#
No. ODEN does retrieval and synthesis; embeddings for your own store are a separate concern. ODEN returns text you can embed if you want to cache it.