Skip to content

[Proposal] PocketFlow example: 100-line RAG with WFGY 16-problem debug mode #132

@onestardao

Description

@onestardao

Hi PocketFlow team,

PocketFlow’s “100-line LLM framework” design is extremely attractive for people who want to see the whole pipeline at once.:contentReference[oaicite:9]{index=9}

I maintain WFGY, a small MIT-licensed framework focused on RAG failure-mode diagnostics.
Its core is a 16-problem checklist that has been:

  • referenced by Harvard MIMS Lab – ToolUniverse,
  • cited in the QCRI Multimodal RAG Survey,
  • and integrated into Rankify (University of Innsbruck) as a debugging reference.

ProblemMap (single README):

https://github.com/onestardao/WFGY/blob/main/ProblemMap/README.md

Proposal

PocketFlow already has example RAG pipelines. I’d like to propose:

  1. One additional example

    • rag_with_wfgy_debug.py (or similar) showing:
      • the usual 100-line RAG pipeline,
      • plus an optional “debug mode” function that, when enabled, calls the WFGY checklist on bad outputs and prints the problem ID + explanation.
  2. Tiny doc addition

    • A short paragraph in the examples section:
      • explaining that users can toggle this mode to quickly see if their issues are, e.g., retrieval drift (No.1), embedding mismatch (No.5), long-chain reasoning drift (No.3), infra / bootstrap issues, etc.
  3. All under MIT / optional

    • No new dependency; just a small helper function and some prompt text.

If this aligns with the philosophy of keeping PocketFlow small and transparent, I’m happy to:

  • draft the example script,
  • keep everything minimal and easy to maintain,
  • iterate based on your feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions