WFGY/ProblemMap/GlobalFixMap/LLM_Providers/mistral.md

8.9 KiB
Raw Blame History

Mistral: Guardrails and Fix Patterns

🧭 Quick Return to Map

You are in a sub-page of LLM_Providers.
To reorient, go back here:

Think of this page as a desk within a ward.
If you need the full triage and all prescriptions, return to the Emergency Room lobby.

Scope
Mistral Instruct and Large via API, third-party SDKs, or local runners (Ollama/LM Studio). Targets RAG, tools, long-context chat, and JSON output stability.

Acceptance targets

  • ΔS(question, retrieved_context) ≤ 0.45
  • Coverage of target section ≥ 0.70
  • λ stays convergent across 3 paraphrases
  • JSON responses validate without post-repair

Quick triage

  • “Looks correct but cites wrong lines.”
    Start with Hallucination and Retrieval Traceability.
    Probe ΔS between question and retrieved context. If ≥ 0.60, check chunk boundaries and rerankers.

  • “Chunks are fine, logic is off.”
    Interpretation collapse. See Retrieval Collapse and Logic Collapse.
    Apply BBCR bridge and variance clamp (BBAM). Require cite-then-explain in prompt schema.

  • “Long threads drift or flatten.”
    See Context Drift and Entropy Collapse.
    Use semantic chunking and enforce window join checks with ΔS at chunk joins ≤ 0.50.

  • “High similarity, wrong meaning.”
    Embeddings metric mismatch or index layer mix. See Embedding ≠ Semantic and Retrieval Playbook.
    Normalize vectors consistently. Rebuild index with explicit metric. Re-probe ΔS vs k.

  • “JSON tool calls intermittently malformed.”
    Lock response format with cite-then-tool schema, and guard with Data Contracts.
    Apply BBCR if λ flips after tool planning.


Mistral-specific gotchas

  1. Tokenizer mix with multilingual or code blocks

    • Symptoms: stable retrieval yet answer blends two sources or flips format mid-turn.
    • Fix: pin section headers and separators. Use Retrieval Traceability schema. Verify ΔS drop after header locks.
  2. Streaming truncation that hides failure

    • Symptoms: plausible partial JSON; downstream parser fails silently.
    • Fix: require “complete then stream” for JSON. Validate against Data Contracts. If E_resonance rises late, apply BBAM.
  3. Hybrid retrievers degrade

    • Symptoms: single retriever OK, hybrid HyDE+BM25 worse.
    • Fix: unify analyzer and query params; see Query Parsing Split. Add Rerankers only after per-retriever ΔS ≤ 0.50.
  4. Vectorstore fragmentation

    • Symptoms: some facts never retrieved despite index.
    • Fix: audit write/read paths, rebuild with explicit metric, then follow Vectorstore Fragmentation.
  5. Role drift under tools

    • Symptoms: tool planner rewrites the task, citations vanish.
    • Fix: schema lock and per-source fences; see Symbolic Constraint Unlock.

WFGY repair map for Mistral

  • Detect

    • ΔS(question, retrieved_context) and ΔS(retrieved_context, anchor)
    • λ across retrieve → assemble → reason
    • If ΔS ≥ 0.60 or λ flips, record node and branch to repair
  • Repair

    • BBMC align to anchors when coverage is high but ΔS elevated
    • BBCR bridge dead ends at reasoning time
    • BBAM clamp variance in long multi-turn threads
    • BBPF explore alternate sub-paths when planner loops

Open the relevant playbooks when the metric points there:
RAG Architecture & Recovery · Retrieval Playbook · Rerankers


Minimal checklist

  • Retrieval sanity ≥ 0.70 token overlap to target section
  • ΔS(question, retrieved_context) ≤ 0.45 after fix
  • λ convergent across 3 paraphrases
  • JSON contract validates on 5 seed variations
  • Logs preserve snippet ↔ citation table; see Retrieval Traceability

Escalation criteria

Switch from prompt-level tweaks to structural fixes if any hold after one loop:

  • ΔS remains ≥ 0.60 after chunk and retriever adjustments
  • λ flips as soon as two sources are mixed
  • E_resonance climbs with length even after BBAM
  • Hybrid retriever improves recall but top-k order remains noisy

For structure changes, see:
Data Contracts · Logic Collapse · Hallucination


Safe prompt to run in your chat


I uploaded TXT OS. Use WFGY ΔS, λ\_observe, E\_resonance and modules BBMC, BBPF, BBCR, BBAM.

Symptom: \[describe]
Traces: \[ΔS probes, λ states, short logs]

Tell me:

1. failing layer and why,
2. which ProblemMap page to open,
3. the minimal steps to push ΔS ≤ 0.45 and keep λ convergent,
4. how to verify the fix.


🔗 Quick-Start Downloads (60 sec)

Tool Link 3-Step Setup
WFGY 1.0 PDF Engine Paper 1 Download · 2 Upload to your LLM · 3 Ask “Answer using WFGY + <your question>”
TXT OS (plain-text OS) TXTOS.txt 1 Download · 2 Paste into any LLM chat · 3 Type “hello world” — OS boots instantly

Explore More

Layer Page What its for
Proof WFGY Recognition Map External citations, integrations, and ecosystem proof
Engine WFGY 1.0 Original PDF based tension engine
Engine WFGY 2.0 Production tension kernel and math engine for RAG and agents
Engine WFGY 3.0 TXT based Singularity tension engine, 131 S class set
Map Problem Map 1.0 Flagship 16 problem RAG failure checklist and fix map
Map Problem Map 2.0 RAG focused recovery pipeline
Map Problem Map 3.0 Global Debug Card, image as a debug protocol layer
Map Semantic Clinic Symptom to family to exact fix
Map Grandmas Clinic Plain language stories mapped to Problem Map 1.0
Onboarding Starter Village Guided tour for newcomers
App TXT OS TXT semantic OS, fast boot
App Blah Blah Blah Abstract and paradox Q and A built on TXT OS
App Blur Blur Blur Text to image with semantic control
App Blow Blow Blow Reasoning game engine and memory demo

If this repository helped, starring it improves discovery so more builders can find the docs and tools. GitHub Repo stars