Productivity 19-Year-Old Founder Emerges From Stealth With $11 Million to Sell You a $3,499 'Brain in a Box' That Runs Your AI Agents at Home AI Agents Half a Million Interviews In: HackerRank's AI Interviewer Chakra Goes GA, and It Wants to Replace Three Hiring Rounds With One Security After Claude Agents Escaped Its Sandbox 3 Times, Anthropic Deploys Real-Time Classifiers to Stop the Next Escape Before It Happens Business Meta Halves Its Internal Claude Users to 30,000 and Microsoft Slashes a $1 Billion Anthropic Budget by More Than a Third Business Sony Innovation Fund Backs Primitive Labs, a Startup That Builds Simulated Crowds to Stress-Test Products Before Launch Apple Intelligence Apple Removed the Apple Intelligence Off Switch in macOS 27 — So a Developer Built a CLI That Deletes It Anyway Security OpenAI Turns On Invisible Text Watermarks for ChatGPT in the EU — and Publishes Exactly How Weak They Are News A Mystery 'Space Bunny Alpha' Model Just Topped OpenRouter's Leaderboard With 38.7 Trillion Tokens a Week Productivity 19-Year-Old Founder Emerges From Stealth With $11 Million to Sell You a $3,499 'Brain in a Box' That Runs Your AI Agents at Home AI Agents Half a Million Interviews In: HackerRank's AI Interviewer Chakra Goes GA, and It Wants to Replace Three Hiring Rounds With One Security After Claude Agents Escaped Its Sandbox 3 Times, Anthropic Deploys Real-Time Classifiers to Stop the Next Escape Before It Happens Business Meta Halves Its Internal Claude Users to 30,000 and Microsoft Slashes a $1 Billion Anthropic Budget by More Than a Third Business Sony Innovation Fund Backs Primitive Labs, a Startup That Builds Simulated Crowds to Stress-Test Products Before Launch Apple Intelligence Apple Removed the Apple Intelligence Off Switch in macOS 27 — So a Developer Built a CLI That Deletes It Anyway Security OpenAI Turns On Invisible Text Watermarks for ChatGPT in the EU — and Publishes Exactly How Weak They Are News A Mystery 'Space Bunny Alpha' Model Just Topped OpenRouter's Leaderboard With 38.7 Trillion Tokens a Week

Building a Retrieval Index for Your Own Documents

Building a Retrieval Index for Your Own Documents

Chunking strategy decides most of your answer quality. Here is a workable approach for PDFs, Markdown and web pages.

Retrieval systems live or die on how documents are split. Get chunking right and a modest model performs well; get it wrong and no amount of prompt tuning recovers it.

Chunking rules that work

  • Split on structure, not character count. Headings, list boundaries and paragraph breaks are natural units.
  • Keep headings with their content. Prefix each chunk with the heading path so a retrieved passage carries its context.
  • Overlap slightly. A small overlap prevents answers that straddle a boundary from being cut in half.
  • Never split a table. Convert it to a compact textual form or keep it whole, even if the chunk grows.

Choosing a size

Aim for chunks in the range of one to three paragraphs. Smaller chunks retrieve more precisely but lose surrounding explanation; larger chunks retrieve noise. Test both on your own question set — the right answer depends on your documents.

Metadata is not optional

Store source file, section title, last-modified date and a URL with every chunk. You need it for citations, for filtering by recency, and for deleting stale content when source documents change.

Refresh on a schedule

An index that is not refreshed slowly becomes wrong. Tie reindexing to your source system's update events, or rebuild nightly if events are unavailable.

Comments (0)

Log in to join the discussion

Log In

No comments yet