Skip to content

Commit 45cb78f

Browse files
committed
docs: pointer to LLM recall fallback in architecture.md
Mark the polish steps that completed in this pass.
1 parent f61cdef commit 45cb78f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

docs/architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ You type `slopmortem query "we're building a marketplace for industrial scrap me
7979
2. **Embeddings.** Dense via fastembed `nomic-ai/nomic-embed-text-v1.5` (local ONNX, 768d). Sparse via fastembed BM25. Two vectors per query, both free.
8080
3. **Retrieve.** Qdrant runs three prefetches in parallel (dense, sparse, and one filtered by your facets), then fuses them server-side with Reciprocal Rank Fusion. Top 30 come back. No HyDE, no query rewriting. We skipped HyDE because Haiku has a known habit of rewriting pitches as post-mortem openings stuffed with its favorite failure tropes ("ran out of runway", "scaled too fast"), and that would bias retrieval toward generic-failure clusters. Rerank at K=30 → N=5 should absorb the modality gap. Revisit in v2 if real-pitch recall measures poorly.
8181
4. **Rerank.** One Sonnet call scores all 30 against a multi-perspective rubric. Output is JSON via OpenRouter's `response_format=json_schema`, which routes to Anthropic's grammar-constrained sampling on the backend. No tools, no corpus reads, nothing to parse out of prose. Top 5 survive.
82+
4b. **LLM recall fallback** (opt-in, off by default). When retrieval misses a vertical entirely, an Opus call names candidate comparables from training data, verifies them via Wayback, and persists them as `source=llm_recall` corpus entries. See `docs/plans/2026-05-08-llm-recall-fallback.md`.
8283
5. **Synthesize.** The first call runs alone, on purpose. It writes the prompt cache so the other four don't race to write the same prefix. We assert `cache_creation_tokens > 0` on that warm response, because Anthropic's cache is eventually consistent across regions and a 200 OK doesn't actually mean the prefix replicated yet. One re-warm retry if it didn't. Then the rest fan out under `anyio.CapacityLimiter(N)` with `asyncio.gather(..., return_exceptions=True)`, so one flaky candidate drops one report instead of killing all five. The model can hit `get_post_mortem` or `search_corpus` mid-generation if it wants more context. The LLM emits an `LLMSynthesis`; the pipeline composes the user-visible `Synthesis` from it plus `failure_date` and `lifespan_months` derived from the candidate's typed `CandidatePayload`, so those two fields can't be fabricated from prose.
8384
6. **Consolidate risks.** One Sonnet call reads the pitch and every per-candidate lesson, merges paraphrases, and drops anything that doesn't latch onto something concrete in the pitch. The Jaccard pass it replaced was happily emitting "don't use MLM" on pitches with no referral mechanic. Output is up to 10 risks, each with a severity bucket and an `applies_because` line that has to name a specific bit of the pitch. The stage caps highs at 4 and drops any fabricated `candidate_id` the model invents. Skipped on `BudgetExceededError`.
8485
7. **Render.** Markdown to stdout. Top-risks section first when present, then per-candidate sections, then a footer with cost, latency, and the trace ID. Paste the Laminar link from the terminal when something looks off.

docs/plans/2026-05-08-llm-recall-fallback.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,11 +1352,11 @@ The 7 telecom entries can wait — they hurt one out-of-vertical pitch each, and
13521352

13531353
### Polish
13541354

1355-
- [ ] **Step 1: Run post-implementation polish**
1355+
- [x] **Step 1: Run post-implementation polish**
13561356

13571357
Dispatch the `post-implementation-polish` skill on the diff produced by Tasks 1–8.
13581358

1359-
- [ ] **Step 2: Address findings, recommit if needed**
1359+
- [x] **Step 2: Address findings, recommit if needed**
13601360

13611361
Each polish-driven fix lands as its own commit so blame stays useful.
13621362

@@ -1366,7 +1366,7 @@ Each polish-driven fix lands as its own commit so blame stays useful.
13661366

13671367
Expected: clean, coverage on new modules ≥ existing project floor.
13681368

1369-
- [ ] **Step 4: Update `docs/architecture.md`**
1369+
- [x] **Step 4: Update `docs/architecture.md`**
13701370

13711371
Add a one-line pointer:
13721372

0 commit comments

Comments
 (0)