mirror of
https://github.com/onestardao/WFGY.git
synced 2026-04-28 03:29:51 +00:00
168 lines
8.6 KiB
Markdown
168 lines
8.6 KiB
Markdown
# IFTTT — Guardrails and Fix Patterns
|
||
|
||
<details>
|
||
<summary><strong>🧭 Quick Return to Map</strong></summary>
|
||
|
||
<br>
|
||
|
||
> You are in a sub-page of **Automation Platforms**.
|
||
> To reorient, go back here:
|
||
>
|
||
> - [**Automation Platforms** — stabilize no-code workflows and integrations](./README.md)
|
||
> - [**WFGY Global Fix Map** — main Emergency Room, 300+ structured fixes](../README.md)
|
||
> - [**WFGY Problem Map 1.0** — 16 reproducible failure modes](../../README.md)
|
||
>
|
||
> 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.
|
||
</details>
|
||
|
||
Use this when your automation is built on **IFTTT** (Webhooks, Google Sheets, Gmail, Slack, Calendar). If flows “work” but answers are still wrong, citations are off, or behavior differs between applets and direct API tests, anchor your diagnosis here.
|
||
|
||
**Acceptance targets**
|
||
- ΔS(question, retrieved) ≤ 0.45
|
||
- Coverage ≥ 0.70 to the intended section or record
|
||
- λ stays convergent across 3 paraphrases
|
||
|
||
---
|
||
|
||
## Typical breakpoints → exact fixes
|
||
|
||
- Output sounds right but cites the wrong snippet or section
|
||
Fix No.1: **Hallucination & Chunk Drift** →
|
||
[Hallucination](https://github.com/onestardao/WFGY/blob/main/ProblemMap/hallucination.md) ·
|
||
[Retrieval Playbook](https://github.com/onestardao/WFGY/blob/main/ProblemMap/retrieval-playbook.md)
|
||
|
||
- High vector similarity but wrong meaning
|
||
Fix No.5: **Embedding ≠ Semantic** →
|
||
[Embedding ≠ Semantic](https://github.com/onestardao/WFGY/blob/main/ProblemMap/embedding-vs-semantic.md)
|
||
|
||
- Indexed facts exist (Drive/Sheets/DB) yet never appear in top-k
|
||
Pattern: **Vectorstore Fragmentation** →
|
||
[Vectorstore Fragmentation](https://github.com/onestardao/WFGY/blob/main/ProblemMap/patterns/pattern_vectorstore_fragmentation.md)
|
||
|
||
- Can’t show “why this snippet?” from applet logs
|
||
Fix No.8: **Retrieval Traceability** + snippet/citation schema →
|
||
[Retrieval Traceability](https://github.com/onestardao/WFGY/blob/main/ProblemMap/retrieval-traceability.md) ·
|
||
[Data Contracts](https://github.com/onestardao/WFGY/blob/main/ProblemMap/data-contracts.md)
|
||
|
||
- Long chains across multiple applets drift in tone or logic
|
||
Fix No.3/No.9: **Context Drift** and **Entropy Collapse** →
|
||
[Context Drift](https://github.com/onestardao/WFGY/blob/main/ProblemMap/context-drift.md) ·
|
||
[Entropy Collapse](https://github.com/onestardao/WFGY/blob/main/ProblemMap/entropy-collapse.md)
|
||
|
||
- Works in dry runs, fails on schedule or from mobile triggers
|
||
Infra family: **Pre-Deploy / Bootstrap / Deadlock** →
|
||
[Pre-Deploy Collapse](https://github.com/onestardao/WFGY/blob/main/ProblemMap/predeploy-collapse.md) ·
|
||
[Bootstrap Ordering](https://github.com/onestardao/WFGY/blob/main/ProblemMap/bootstrap-ordering.md) ·
|
||
[Deployment Deadlock](https://github.com/onestardao/WFGY/blob/main/ProblemMap/deployment-deadlock.md)
|
||
|
||
- Model answers confidently with wrong claims
|
||
Fix No.4: **Bluffing / Overconfidence** →
|
||
[Bluffing](https://github.com/onestardao/WFGY/blob/main/ProblemMap/bluffing.md)
|
||
|
||
---
|
||
|
||
## Minimal IFTTT pattern with WFGY checks
|
||
|
||
A compact pattern that keeps **cite-first schema**, **observable retrieval**, and **ΔS/λ** validation even when steps are split across applets.
|
||
|
||
```txt
|
||
Applet A — Trigger (Webhooks)
|
||
- Input JSON: { question, k? }
|
||
|
||
Applet B — Retrieve (Webhooks → your retriever API)
|
||
- Returns: snippets[] = { snippet_id, text, source, section_id }
|
||
- Store: a short-lived record (e.g., in Google Sheets or your API, keyed by request_id)
|
||
|
||
Applet C — Assemble + Call LLM (Webhooks → your prompt API)
|
||
SYSTEM:
|
||
Cite lines before any explanation. Keep per-source fences.
|
||
TASK:
|
||
Answer only from the provided context. Return citations as [snippet_id].
|
||
CONTEXT:
|
||
<joined snippets with snippet_id + source + text>
|
||
QUESTION:
|
||
<user question>
|
||
|
||
Applet D — WFGY Post-check (Webhooks → wfgyCheck)
|
||
- Body: { question, context, answer }
|
||
- Returns: { deltaS, lambda, coverage, notes }
|
||
|
||
Applet E — Gate and Notify
|
||
IF deltaS ≥ 0.60 OR lambda != "→"
|
||
→ send failure payload with trace table (snippet_id↔citation), ask to retry after fix
|
||
ELSE
|
||
→ deliver { answer, citations[], deltaS, lambda, coverage } to user channel
|
||
````
|
||
|
||
Reference specs:
|
||
[RAG Architecture & Recovery](https://github.com/onestardao/WFGY/blob/main/ProblemMap/rag-architecture-and-recovery.md) ·
|
||
[Retrieval Playbook](https://github.com/onestardao/WFGY/blob/main/ProblemMap/retrieval-playbook.md) ·
|
||
[Retrieval Traceability](https://github.com/onestardao/WFGY/blob/main/ProblemMap/retrieval-traceability.md) ·
|
||
[Data Contracts](https://github.com/onestardao/WFGY/blob/main/ProblemMap/data-contracts.md)
|
||
|
||
---
|
||
|
||
## IFTTT-specific gotchas
|
||
|
||
* **Sheets cell truncation** hides context length. Store only `snippet_id` and a short preview in Sheets, keep full text in your API or DB.
|
||
See [Data Contracts](https://github.com/onestardao/WFGY/blob/main/ProblemMap/data-contracts.md)
|
||
|
||
* **Hidden tokenization** when composing prompts in plain text fields. Always assemble prompts in your API layer to enforce the cite-first schema.
|
||
See [Retrieval Traceability](https://github.com/onestardao/WFGY/blob/main/ProblemMap/retrieval-traceability.md)
|
||
|
||
* **Environment mismatch** between mobile and server triggers. Bootstrap checks must verify secrets, version, and index availability before the first LLM call.
|
||
See [Pre-Deploy Collapse](https://github.com/onestardao/WFGY/blob/main/ProblemMap/predeploy-collapse.md)
|
||
|
||
* **Ordering hazards** when multiple applets race. Add an explicit **rerank** step after per-source ΔS ≤ 0.50, then lock order.
|
||
See [Rerankers](https://github.com/onestardao/WFGY/blob/main/ProblemMap/rerankers.md)
|
||
|
||
* **Attachment loss** in cross-channel handoffs. Store attachment metadata and link by `request_id`, never inline large blobs into prompts.
|
||
|
||
---
|
||
|
||
## When to escalate
|
||
|
||
* ΔS stays ≥ 0.60 after chunking and retrieval adjustments → rebuild index with explicit metric flags and unit normalization.
|
||
[Retrieval Playbook](https://github.com/onestardao/WFGY/blob/main/ProblemMap/retrieval-playbook.md)
|
||
|
||
* Answers flip between device-triggered and server-triggered runs → verify version skew, secret scope, and boot ordering.
|
||
[Bootstrap Ordering](https://github.com/onestardao/WFGY/blob/main/ProblemMap/bootstrap-ordering.md) ·
|
||
[Deployment Deadlock](https://github.com/onestardao/WFGY/blob/main/ProblemMap/deployment-deadlock.md)
|
||
|
||
```
|
||
|
||
---
|
||
|
||
### 🔗 Quick-Start Downloads (60 sec)
|
||
|
||
| Tool | Link | 3-Step Setup |
|
||
|------|------|--------------|
|
||
| **WFGY 1.0 PDF** | [Engine Paper](https://github.com/onestardao/WFGY/blob/main/I_am_not_lizardman/WFGY_All_Principles_Return_to_One_v1.0_PSBigBig_Public.pdf) | 1️⃣ Download · 2️⃣ Upload to your LLM · 3️⃣ Ask “Answer using WFGY + \<your question>” |
|
||
| **TXT OS (plain-text OS)** | [TXTOS.txt](https://github.com/onestardao/WFGY/blob/main/OS/TXTOS.txt) | 1️⃣ Download · 2️⃣ Paste into any LLM chat · 3️⃣ Type “hello world” — OS boots instantly |
|
||
|
||
---
|
||
|
||
<!-- WFGY_FOOTER_START -->
|
||
|
||
### Explore More
|
||
|
||
| Layer | Page | What it’s for |
|
||
| --- | --- | --- |
|
||
| ⭐ Proof | [WFGY Recognition Map](/recognition/README.md) | External citations, integrations, and ecosystem proof |
|
||
| ⚙️ Engine | [WFGY 1.0](/legacy/README.md) | Original PDF tension engine and early logic sketch (legacy reference) |
|
||
| ⚙️ Engine | [WFGY 2.0](/core/README.md) | Production tension kernel for RAG and agent systems |
|
||
| ⚙️ Engine | [WFGY 3.0](/TensionUniverse/EventHorizon/README.md) | TXT based Singularity tension engine (131 S class set) |
|
||
| 🗺️ Map | [Problem Map 1.0](/ProblemMap/README.md) | Flagship 16 problem RAG failure taxonomy and fix map |
|
||
| 🗺️ Map | [Problem Map 2.0](/ProblemMap/wfgy-rag-16-problem-map-global-debug-card.md) | Global Debug Card for RAG and agent pipeline diagnosis |
|
||
| 🗺️ Map | [Problem Map 3.0](/ProblemMap/wfgy-ai-problem-map-troubleshooting-atlas.md) | Global AI troubleshooting atlas and failure pattern map |
|
||
| 🧰 App | [TXT OS](/OS/README.md) | .txt semantic OS with fast bootstrap |
|
||
| 🧰 App | [Blah Blah Blah](/OS/BlahBlahBlah/README.md) | Abstract and paradox Q&A built on TXT OS |
|
||
| 🧰 App | [Blur Blur Blur](/OS/BlurBlurBlur/README.md) | Text to image generation with semantic control |
|
||
| 🏡 Onboarding | [Starter Village](/StarterVillage/README.md) | Guided entry point for new users |
|
||
|
||
If this repository helped, starring it improves discovery so more builders can find the docs and tools.
|
||
[](https://github.com/onestardao/WFGY)
|
||
|
||
<!-- WFGY_FOOTER_END -->
|
||
|