# đ Beginner Guide â How to Identify & Fix Your AI Failure
*A zeroâtoâhero crashâcourse for anyone new to WFGY, RAG pipelines, or âwhy is my model hallucinating?â*
---
## 0. đŻ Why This Guide Exists
If you landed on the **Problem Map** and felt overwhelmed by 16 exotic failure modes (ÎS? BBCR? bootstrap race?!), start here.
1. **Rapid Symptom Check** â pinpoint which problem table row matches your bug.
2. **Concept Primer** â learn the minimum theory (RAG, embeddings, reasoning chains).
3. **Tool Setup** â grab the openâsource files (all MITâlicensed) and reproduce the fix.
Total reading time: **ââŻ10âŻmin**. After that, jump back to the [Problem Map](./README.md) and dive deep.
---
## 1. đ âWhich Symptom Matches My Bug?â
Below is a *mini* decision tree. Start at the top, follow the **first âYesâ** branch you hit, then look up the **Problem ID** in the main table.
| Question | Yes â Go To | No â Next Check |
|----------|-------------|-----------------|
| Are you **retrieving** chunks that look correct **but answer is wrong**? | #1 Hallucination & Chunk Drift | â |
| Does the model reach the chunk **but fails logically** (e.g. wrong reasoning)? | #2Â Interpretation Collapse | â |
| Do multiâstep tasks **derail after a few hops**? | #3Â Long Reasoning Chains | â |
| Does the model **invent confident nonsense**? | #4Â Bluffing / Overconfidence | â |
| High cosine similarity **yet semantic meaning off**? | #5Â Semantic â Embedding | â |
| Pipeline **deadâends / loops** logic? | #6Â Logic Collapse & Recovery | â |
| Long chat (>Â 50 turns) **forgets context**? | #7Â Memory Breaks Across Sessions | â |
| Failure path **invisible / no logs**? | #8Â Debugging is a Black Box | â |
| Output suddenly **incoherent / repetitive**? | #9Â Entropy Collapse | â |
| Replies **flat & literal**, creativity gone? | #10Â Creative Freeze | â |
| Formal math / symbolic prompts **crash**? | #11Â Symbolic Collapse | â |
| Selfâreference / paradox **freezes** model? | #12Â Philosophical Recursion | â |
| Multiple agents **overwrite** each other? | #13Â MultiâAgent Chaos | â |
| Deployment starts **before index ready**? | #14Â Bootstrap Ordering | â |
| Services **wait on each other forever**? | #15Â Deployment Deadlock | â |
| First LLM call **crashes after deploy**? | #16Â PreâDeploy Collapse | File an Issue â unknown |
> **Tip:** Not sure? Capture a failing trace (input â retrieval â output) and open a GitHub Discussion â weâll help classify it.
---
## 2. đ§ Core Concepts in <âŻ5âŻMinutes
### 2.1 What Is RAG?
**RetrievalâAugmented Generation** feeds external knowledge (your PDFs, DB, wiki) into a language model *during* inference.
```
User â Query ââ
ââ> \[ Retriever ] â> topâk chunks â prompt â \[ LLM ] â answer
Vector DB / Search âââââ
```
Why it breaks:
* Wrong chunk (vector drift) â hallucination.
* Correct chunk + broken prompt â interpretation collapse.
* Long chain of tools â hidden state loss.
### 2.2 Embeddings vs Semantics
Cosine similarity (dense vectors) â human meaning. WFGYâs ÎS metric spots gaps in *semantic* resonance, not just distance.
### 2.3 Reasoning Chains
LLM â database. Complex tasks span multiple calls: *parse â retrieve â reason â act*. Losing state midâchain is #3.
### 2.4 WFGY Modules (30âsec cheatâsheet)
| Module | Purpose |
|--------|---------|
| **BBMC** | BoundaryâBounded Memory Chunks â safe semantic units |
| **BBPF** | BranchâBounded Prompt Frames â stable context windows |
| **BBCR** | BreakâBefore Crash Reset â aborts / resets logic loops |
| **ÎS Metric** | Measures semantic tension (unknown topic, drift) |
You donât need to rebuild them â TXTâŻOS hands you readyâtoâpaste text files.
---
## 3. đ ď¸ Quick Tool Setup
| Step | What to Do | Time |
|------|------------|------|
| 1ď¸âŁ | Download **WFGYâŻ1.0 PDF** and **TXTâŻOS** (links below) | 30âŻs |
| 2ď¸âŁ | Paste TXT OS into any LLM chat (Claude, GPTâ4, local llamaâcpp) | 15âŻs |
| 3ď¸âŁ | Ask: `âDiagnose my RAG: {describe bug}â` | Go |
*The OS autoâloads Problem Map indexes; you can also open Markdown files locally.*
### Download Links
| Asset | Link |
|-------|------|
| **WFGYÂ 1.0 PDF** | https://zenodo.org/records/15630969 |
| **TXTÂ OS** | https://zenodo.org/records/15788557 |
> **Everything is MITâlicensed** â free for commercial & research use.
---
## 4. đď¸ Problem Categories (cheatâlabel)
| Category | IDs | Typical Stage |
|----------|-----|---------------|
| **Prompting** | #4 | Prompt crafting / safety |
| **Retrieval** | #1Â #5Â #8 | Vector DB, search, RAG |
| **Reasoning** | #2Â #6Â #11 | Midâchain logic |
| **Infra / Deploy** | #14 #15 #16 | DevOps, orchestration |
*(The table also appears under the main Problem Map for quick visual filter.)*
---
## 5. đ Next Steps
1. **Identify** your bug via the quick decision tree above.
2. **Open** the corresponding `.md` file in the Problem Map.
3. **Apply** the patch (many include code snippets, BBPF prompt frames, or Docker diff).
4. **Share** results! Open a PR if you found a variant or edgeâcase â the map keeps growing.
---
## 6. đ FAQ (Super Short)
| Question | Answer |
|----------|--------|
| *Do I need all modules?* | No. Start with the module named in the problem page. |
| *Does WFGY replace LangChain / LlamaIndex?* | It layers **above** them (reasoning firewall). |
| *Will it work on GPTâ3.5?* | Yes, but complex fixes (#11, #12) need âĽâŻGPTâ4 or good local models. |
---
### â Help Us Expand the Map
- đ Got a new failure trace? [Open an Issue](https://github.com/onestardao/WFGY/issues).
- đ§Š Have a fix? PRs welcome â credit in the Hall of Fame.
- đ Star the repo to unlock Engine 2.0 once we hit **10âŻk** stars.
---
### đ§ Explore More
| Module | Description | Link |
|-----------------------|----------------------------------------------------------|----------|
| WFGY Core | Standalone semantic reasoning engine for any LLM | [View â](https://github.com/onestardao/WFGY/tree/main/core/README.md) |
| Problem Map 1.0 | Initial 16-mode diagnostic and symbolic fix framework | [View â](https://github.com/onestardao/WFGY/tree/main/ProblemMap/README.md) |
| Problem Map 2.0 | RAG-focused failure tree, modular fixes, and pipelines | [View â](https://github.com/onestardao/WFGY/blob/main/ProblemMap/rag-architecture-and-recovery.md) |
| Semantic Clinic Index | Expanded failure catalog: prompt injection, memory bugs, logic drift | [View â](https://github.com/onestardao/WFGY/blob/main/ProblemMap/SemanticClinicIndex.md) |
| Semantic Blueprint | Layer-based symbolic reasoning & semantic modulations | [View â](https://github.com/onestardao/WFGY/tree/main/SemanticBlueprint/README.md) |
| Benchmark vs GPT-5 | Stress test GPT-5 with full WFGY reasoning suite | [View â](https://github.com/onestardao/WFGY/tree/main/benchmarks/benchmark-vs-gpt5/README.md) |
---
> đ **Early Stargazers: [See the Hall of Fame](https://github.com/onestardao/WFGY/tree/main/stargazers)** â
> Engineers, hackers, and open source builders who supported WFGY from day one.
> â Help reach 10,000 stars by 2025-09-01 to unlock Engine 2.0 for everyone â Star WFGY on GitHub