search
search

Semantic search over facts

Changed on

Execute semantic search using RAG retrieval strategy.

Ranking formula: combined_score = (similarity × 0.7) + (pot_score × 0.3)

Results are ordered by combined score descending.

Filtering:

  • min_pot_score: Pre-filter by minimum certainty score
  • filters.domain: Post-filter by exact domain match
  • filters.level: Post-filter by POT Index level(s) (OR logic)
  • filters.tags: Post-filter by tags (AND logic - must have ALL)
post/pots/{pot_id}/search

Request

Path parameters

pot_idstring required

POT identifier (UUID or slug)

Request body

querystring required

Natural language search query

top_kinteger

Maximum number of results to return

min_pot_scorenumber

Minimum POT Index threshold for results

min_similaritynumber nullable

Drop results whose raw similarity to the query is below this. Omitted = the server default (SEARCH_MIN_SIMILARITY, 0.20). 0 returns everything, as before.

relative_cutoffnumber nullable

Also drop results whose similarity is below this fraction of the best result's (e.g. 0.6 keeps those at least 60% as similar as the top one). Omitted = off.

as_ofstring date nullable

Day to judge validity on (ISO 8601). Each result says whether it is in force that day (currency); nothing is excluded. Omitted = today (UTC). A future day answers what will be in force then.

include_contentboolean

Include full fact content in results (set false for compact response)

Example request

{
  "filters": {
    "domain": "architecture"
  },
  "min_pot_score": 0.4,
  "query": "How does POT Index propagate through edges?",
  "top_k": 10
}

Response

Successful search

object required

Changes