Knowledge Engine

Find the right records
before you ask AI to reason.

Knowledge Engine ranks your records by meaning — not keywords — using local embeddings, an in-memory cache, and a threshold-aware top-K cut, then hands only the closest matches to the AI step that follows.

Semantic Ranking
Cache + Threshold
Graceful Fallback
Where It Runs
app.totalapp.app/core-engines/knowledge-engine
Knowledge Engine
TotalApp
Semantic RankingCache + ThresholdGraceful FallbackWhere It Runs
Find the right records before you ask AI to…Knowledge Engine
Semantic Ranking
Semantic Ranking
Local embeddings — your query and…
Cosine similarity ranking — candidates…
Cache + Threshold
Content-derived cache key — no…
A changed record auto-invalidates its…
Graceful Fallback
No embedding model configured →…
Ollama unreachable or an embed call…
Cache + Threshold
Content-derived cache key — no cross-domain id…
A changed record auto-invalidates its own cache…
Optional minScore + topK — keeps the downstream AI…
Graceful Fallback
No embedding model configured → automatic keyword…
Ollama unreachable or an embed call fails → same…
Where It Runs
Patent & R&D Operations — competitor patents…
Customs & Global Trade Operations — trade…
Semantic Search — the same primitive ranks your My…
Knowledge Engine

Meaning first, keywords last

Content-derived cache…✓
A changed record…✓
Optional minScore + topK…✓
Try Knowledge Engine
Knowledge Engine ranks your records by meaning — not…
Knowledge Engine
Semantic Ranking
Cache + Threshold
Graceful Fallback
Where It Runs
Knowledge Engine AI
Knowledge Engine ranks your records by meaning — not keywords — using local embeddings, an in-memory cache, and a…
Try Knowledge Engine
Meaning first, keywords lastCache + Threshold
Semantic Ranking

Meaning first,
keywords last

Every screen that needs to shortlist its own records — competitor patents, compliance rules, prior art — hands its query text and candidates to one shared function. It never re-implements embedding or scoring logic.

  • ✓
    Local embeddings — your query and every candidate's text are embedded through your own Ollama instance
  • ✓
    Cosine similarity ranking — candidates sorted by how close their meaning is to your query, not by word overlap
  • ✓
    Threshold before top-K — a weak match can never occupy a slot a stronger one deserved
  • ✓
    One shared engine, reused by every domain that needs it
Open a Similar-Records Screen
“encryption hardware module”
SAN-2026-001292%
dual-use crypto
SAN-2026-003478%
secure comms
SAN-2026-000761%
signal jamming
Sent to AI
3 / 47
top records
Meaning first, keywords lastEmbedding ranked.
Cache + Threshold

Never re-embed
the same record twice

An in-memory cache, keyed by each record's own content, means editing one record invalidates only its own entry — every other record's embedding stays reusable across every domain that shares the engine.

  • ✓
    Content-derived cache key — no cross-domain id collisions, ever
  • ✓
    A changed record auto-invalidates its own cache entry — no version field to maintain
  • ✓
    Optional minScore + topK — keeps the downstream AI prompt focused, never overloaded
  • ✓
    Purely additive — every pre-existing call site keeps working unchanged
Read the Full Reference
1rankDocsByEmbedding(query, docs, {
2 minScore: 0.6,
3 topK: 5
4})
5
6// content-derived cache key
7`${text.length}:${text}`
Cache
44 cached
3 fresh
Embedded
3 of 47 fresh
44 from cache
Never re-embed a recordSame text, same vector.
Graceful Fallback

No local model?
Still useful.

If Ollama isn't configured, unreachable, or every candidate falls below the threshold, Knowledge Engine drops to a keyword match instead of returning nothing — the downstream AI step still gets a relevant shortlist.

  • ✓
    No embedding model configured → automatic keyword fallback
  • ✓
    Ollama unreachable or an embed call fails → same fallback, never a crash
  • ✓
    Threshold clears no candidates → falls back rather than showing an empty list
  • ✓
    The function never throws — callers always get { matches, degraded }
Explore Semantic Search
Local embedding model unavailable — showing keyword matches
Keyword fallback
EP3982101A2
key isolation
keyword
US10884812B2
secure enclave
keyword
Next
Deeper AI analysis still runs on this shortlist.
No local model? Still usefulGraceful degradation.
Where It Runs

Always local.
Never proxied.

Knowledge Engine talks directly to your own local Ollama instance — it has no server-side counterpart and never can, because Render's servers have no network path to your machine. The AI step that follows is separate and can run wherever you've configured it.

  • ✓
    Patent & R&D Operations — competitor patents, prior art, literature, licensing guidelines
  • ✓
    Customs & Global Trade Operations — trade compliance and sanctions rules
  • ✓
    Semantic Search — the same primitive ranks your My Knowledge library
  • ✓
    One shared engine — every new domain reuses it instead of reimplementing it
Explore Patent & R&D Operations
1
Knowledge Engine
always your local Ollama
2
AI Synthesis
your Settings → Agentic choice
Independent
Changing one setting never affects the other.
Always local. Never proxied.Your data stays home.