Practical overview
When it fits
Use Longparser when a RAG workflow needs document parsing and chunking, particularly when a human review stage should precede embedding and indexing.
Who it is for
- Developers preparing office documents for retrieval-augmented generation.
- Teams that want human approval or editing before extracted content is embedded.
- Builders integrating document ingestion and document-grounded chat through Python or FastAPI.
Documented uses
- Extract structured content from PDFs and common office formats.
- Create token-aware, heading-aware and table-aware retrieval chunks.
- Review, edit or reject extracted blocks and chunks before embedding.
- Embed and index reviewed content in a supported vector store, then chat about indexed documents.
Requirements & limits
The project is identified as open source and its repository is public. Python 3.11 or newer is required.
- The core SDK and server are distinct installation choices; the
serverextra adds FastAPI, MongoDB, Redis and LangChain chat. - The default PDF OCR path requires Tesseract and the appropriate language data.
- Vector-store options named in the documentation include Chroma, FAISS and Qdrant; Qdrant is a separate extra.
- The project describes local extraction and embeddings, but hosted LLM or embedding providers receive content sent to them.
- Memory chat is described as short-term turns, a rolling summary and long-term facts.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Process and chunk a document with the Python SDK
Use the SDK to extract a supported file and produce chunks.
Before you start
- Python 3.11 or newer
- Install the core package with
pip install longparser - For the default PDF OCR path, Tesseract and the appropriate language data
Steps
Create a
DocumentPipelinewithProcessingConfig().Pass a document path to
process_file().Pass the result and a
ChunkingConfig()topipeline.chunk().
Expected outcome
The example exposes document page metadata and the resulting chunk count and text.
Guide limitations
- The documented example does not cover embedding, indexing or chat.
- The default PDF OCR path requires Tesseract and language data.
Run the documented API workflow from upload to document chat
Configure the service, upload a document, finalize and embed it, then create a chat session.
Before you start
- Python 3.11 or newer
- Docker Compose
- MongoDB and Redis, started with the documented Compose setup
- An API key and a configured
.envfile
Steps
Copy
.env.exampleto.envand edit the configuration.Start the API, worker, MongoDB and Redis with the command below.
docker compose up -d --buildUpload a supported document to the
/jobsendpoint and check its status until it isready_for_review.Finalize the job and enqueue embedding using the documented API requests.
After the job is indexed, create a chat session and submit a question about the document.
Expected outcome
The documented sequence takes a document job through review readiness and indexing to a document-grounded chat request.
Guide limitations
- The example finalizes with
approve_all_pending; it does not show individual block or chunk edits. - The example uses a Hugging Face embedding model and Chroma; Qdrant and optional extraction backends are separate extras.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- ENDEVSOLS/LongParser · Official homepage title · retained in its source language

