search_local_corpus
Discover legal precedents in the local corpus by concept when exact wording is unknown. Returns matched passages for quick relevance checks before verifying citations live.
Instructions
Concept DISCOVERY over the local corpus.
Searches the local corpus (decisions already fetched this session or
via the corpus crawl) for a legal CONCEPT when the exact wording is
unknown. Each result carries related_quotes — matched passages —
so you can spot relevant precedent without fetching every full text.
Roles are complementary: THIS tool = DISCOVERY over the local corpus;
search_decisions = live CURRENT search + citation verification.
The corpus may lag; always confirm any decision you cite with
search_decisions + get_document first.
QUERY FORM: 2–6 legal keywords, NOT a sentence. All terms are
required (AND) and match anywhere in the text, so narrative filler
only shrinks the result set. Quote words to require them adjacent:
kıdem tazminatı zamanaşımı · "tahliye taahhüdü" geçerlilik.
Unlike Bedesten this index folds diacritics (kamulastirma =
kamulaştırma).
Args:
query: 2–6 legal keywords; "quoted spans" match as phrases.
mode: 'lexical' (default; FTS5/BM25, sub-second), 'rrf'
(BM25+TF-IDF fusion; SLOW — minutes on a large corpus),
'semantic' (dense embeddings), 'hybrid'.
limit: Max results.
filters: Optional dict with source, court, chamber, content_status.
provider: Embedding provider name for semantic modes (ignored for lexical).
source/court/chamber/date/esas_no/karar_no/document_id: Flat
filters — equivalent to putting them in filters.
content_status/draft_usable/quote_usable: Content filters.
sort: 'relevance' (default) or 'date' — lexical mode only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| mode | No | lexical | |
| sort | No | relevance | |
| court | No | ||
| limit | No | ||
| query | Yes | ||
| source | No | ||
| chamber | No | ||
| esas_no | No | ||
| filters | No | ||
| karar_no | No | ||
| provider | No | ||
| document_id | No | ||
| draft_usable | No | ||
| quote_usable | No | ||
| content_status | No |