Skip to content

Support markdown and plain-text file ingestion in the RAG pipeline #85

Description

@alimaandev

Task

\core/rag.py\ currently ingests plain strings via \ingest_document. Issue #22 asked for PDF/txt/markdown file ingestion; the RAG plugin (\plugins/builtins/rag_plugin.py) is text-only today.

Do

  1. Extend \ingest_document\ to accept a \source\ type, or add a helper to read local files
  2. Add markdown handling (strip code fences/headings as needed) and .txt\ support
  3. Wire it into the \ingest_document\ tool / API so users can pass a file path
  4. Add tests in \ ests/test_rag.py\ (mirror the existing tmp_path-isolated pattern)

Verify

  • \python -m pytest tests/test_rag.py -q\ passes
  • Ingesting a small .md\ file returns sensible chunks

  • uff check .\ clean

Notes

  • PDF is harder (needs an extra lib) — markdown + txt is the core scope; note PDF as future work.
  • Use \�syncio.to_thread\ for file reads per project conventions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershelp wantedExtra attention is neededpythonPull requests that update python code

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions