The page leanprompt report --html writes for VectifyAI/PageIndex at commit 0f0d5f7, audited 2026-11-29. Every figure on this page is an estimate from reading the code, not a measurement of the app in use. Corrections and takedown: email info@podwarden.com or open an issue. Back to the audit of VectifyAI/PageIndex

leanprompt audit of VectifyAI/PageIndex

Unattended audit: nobody was asked during the run, so priority, volume and prices were left open; the questions for the owner are listed at the end.

The audit found no place where this app pays for tokens it doesn't need

Plus 2 other problems the audit found, listed after the findings. Not scored.

What's wrong and what to change

0 open, 0 fixed. Largest first, by the audit's estimate of tokens lost per 1,000 calls.

No confirmed findings.

Other problems the audit found

Problems the audit checked in the code that cost no tokens of their own, such as a spend meter that ignores cache tokens or a cut-off answer accepted as complete. They are not scored. Check each one before you change anything.

Two shipped examples default to gpt-4.1, which OpenAI has announced it will shut down

Note 1. cookbook/pageindex-vision-rag.ipynb:153 LP-GE-13 medium not scored

The vision RAG cookbook's call_vlm sends its requests to gpt-4.1 unless the caller passes another model, and the __main__ block of pageindex/page_index_md.py:315 sets MODEL="gpt-4.1". OpenAI's deprecations page (checked on 2026-11-28) lists GPT-4.1 (gpt-4.1-2025-04-14) as Deprecated with a shutdown date of Jan 14, 2027 and gpt-6-luna as the recommended replacement.

What to change
Use the model the README already recommends for indexing (gpt-6-luna) in both places, or read it from the same config the SDK uses, and check that the vision call works with it.
Why it matters
After the shutdown date the notebook's helper and the module's example run fail with a model-not-found error.

How to check the fix Run the vision cookbook's call_vlm with the new default on one page image and confirm an answer is returned.

A node summary cut off by a length stop is stored as is, with its JSON wrapper

Note 2. pageindex/utils.py:650 LP-GE-12 low not scored

_acompletion returns the reply text and never looks at finish_reason (the sync path does when asked, utils.py:599). For node summaries the reply goes to parse_summary (utils.py:1564), which returns the raw reply when it is not valid JSON, so a reply cut off inside {"summary": "... is saved as the node's summary including the opening brace and key. Indexing sends no max_tokens (utils.py:588-596, 642-649), so a cut can come only from the provider's own default or limit; we did not measure how often that happens.

What to change
Read choices[0].finish_reason in _acompletion; on a length stop raise or retry with a shorter ask, and let SummaryScheduler._visit fall back to fallback_summary (utils.py:1180), which it already does for an empty summary.
Why it matters
The stored summary is what the search agent reads when it picks nodes, so a half-written JSON string is noise in the tree that nothing flags.

How to check the fix Mock one completion with finish_reason length and a truncated JSON body and check that the node ends up with the fallback summary, not the fragment.

Fix it with your coding agent

Paste this into Claude Code, Codex, Cursor or any coding assistant. It will check each finding against your code and propose fixes one at a time, asking before it changes anything.

Please check and fix the LLM-call findings from a leanprompt audit of this repository.

1. If the leanprompt skills are not installed for you here, install them: npx leanprompt@0.1.0-dev.15 install
2. Read .leanprompt/findings.json and leanprompt-report.md. If they are missing, use the list below.
3. Check each finding against the code before you change anything. The audit can be wrong: if a finding does not hold, tell me why and leave that code alone.
4. Fix one finding at a time. Show me the change as a small diff and apply it only after I say yes.
5. Prove each fix with the measure-loop skill: a before and after on the same scenario. Ask me before running anything that sends real, billed requests.
6. When a fix is proved, set "fixed": true on its finding in .leanprompt/findings.json and run npx leanprompt@0.1.0-dev.15 score.

Other problems found (check each against the code first; not scored):
- Two shipped examples default to gpt-4.1, which OpenAI has announced it will shut down (cookbook/pageindex-vision-rag.ipynb:153) [LP-GE-13]: The vision RAG cookbook's call_vlm sends its requests to gpt-4.1 unless the caller passes another model, and the __main__ block of pageindex/page_index_md.py:315 sets MODEL="gpt-4.1". OpenAI's deprecations page (checked on 2026-11-28) lists GPT-4.1 (gpt-4.1-2025-04-14) as Deprecated with a shutdown date of Jan 14, 2027 and gpt-6-luna as the recommended replacement. Change: Use the model the README already recommends for indexing (gpt-6-luna) in both places, or read it from the same config the SDK uses, and check that the vision call works with it.
- A node summary cut off by a length stop is stored as is, with its JSON wrapper (pageindex/utils.py:650) [LP-GE-12]: _acompletion returns the reply text and never looks at finish_reason (the sync path does when asked, utils.py:599). For node summaries the reply goes to parse_summary (utils.py:1564), which returns the raw reply when it is not valid JSON, so a reply cut off inside {"summary": "... is saved as the node's summary including the opening brace and key. Indexing sends no max_tokens (utils.py:588-596, 642-649), so a cut can come only from the provider's own default or limit; we did not measure how often that happens. Change: Read choices[0].finish_reason in _acompletion; on a length stop raise or retry with a shorter ask, and let SummaryScheduler._visit fall back to fallback_summary (utils.py:1180), which it already does for an empty summary.

Score

One number from 0 to 100 for how well this app avoids paying for the same tokens twice; higher is better. It is computed from the findings above (static) or from your usage log (measured).

100static
E, prefill reuse
1.00
S, prefix stability
1.00
G, generation waste
0.00
Default shares
0 of 0

Findings scored with severity defaults, not estimates. The fewer, the more the static score says about this app.

A static score is an estimate from the audit's findings, not a measurement.

Scored 2026-11-29 (the date on the machine that ran it).

Questions for the owner

These were not answered during the audit. Until they are, the page shows tokens only and ranks the advice without a priority.

  • Priority: which matters most for this app, cost, speed or quality (or weights)? Not set, so the advice uses equal weights. Answer with priority: in leanprompt.yaml.
  • Volume: how many calls does the app make a month? Answer with volume: {calls_per_month: N, source: "..."} in leanprompt.yaml.
  • Prices: what does each model cost (input, cached input, output per 1M tokens, with the source and the date it was read, and the currency if not US dollars)? Answer with prices: in leanprompt.yaml.