Skip to content

feat(algolia-crawler): recommend helpers.markdown for RAG content#29

Open
leonardocuco wants to merge 1 commit into
mainfrom
feat/markdown-records
Open

feat(algolia-crawler): recommend helpers.markdown for RAG content#29
leonardocuco wants to merge 1 commit into
mainfrom
feat/markdown-records

Conversation

@leonardocuco

Copy link
Copy Markdown
Contributor

What does this skill do?

Adds Algolia's Markdown-for-RAG pattern to the algolia-crawler skill — helpers.markdown() + helpers.splitTextIntoRecords() — as the recommended default for docs/prose content.

Why

Feedback from the crawler/actions team: convert content to Markdown before indexing. Markdown preserves headings, lists, code, tables, and links that a .text() extractor flattens — and it's Algolia's own recommended pattern for AskAI/RAG.

Changes

  • record-extractor.md — leads with "Markdown for RAG — the default for docs and prose" (helpers.markdown(selector)helpers.splitTextIntoRecords({ text, baseRecord, maxRecordBytes, orderingAttributeName }), chunk lives in text, objectIDs auto-suffixed #0/#1). Reframes the hand-rolled extractor for structured data (tables, catalogs).
  • rag-index-settings.md — note to make text the primary searchableAttribute with this pattern.
  • SKILL.md — step 3 points to Markdown as the default for prose.
  • Cross-links the official Markdown indexing guide.

Validated live

Dogfooded on the Algolia Agent Studio docs: helpers.markdown + splitTextIntoRecords produced clean chunked Markdown records (headings/lists/links preserved). Reinforced the skill's own "tune the selector with crawler test" lesson — the guide's generic main > *:not(nav)… selector captured only the "On this page" TOC on this site; the real body was under main [class*=content].

Checklist

  • python3 scripts/validate_skills.py . passes (0 errors)
  • Self-contained; no cross-skill path refs
  • evals/evals.json present

🤖 Generated with Claude Code

Lead record-extractor.md with the Markdown pattern (helpers.markdown +
helpers.splitTextIntoRecords) as the default for docs/prose — Algolia's own
recommended AskAI/RAG approach. It preserves headings, lists, code, and links
that a `.text()` extractor flattens away. Reframe the hand-rolled per-entity
extractor as the choice for structured data (tables, catalogs).

Also: note the `text` searchable attribute in rag-index-settings.md, update
SKILL.md step 3, and cross-link the official Markdown indexing guide. Keeps the
"tune the selector with crawler test" lesson — the generic selector grabbed
only the TOC on a real site.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant