A sophisticated document retrieval system that combines bi-encoder semantic search with cross-encoder reranking to deliver highly relevant, contextually appropriate results for specific user personas and job-to-be-done scenarios.
Build the Docker image:
docker build -t challenge1b .
Prepare your input:
PDFs subdirectory relative to the input JSONExample structure:
input/
├── challenge1b_input.json
└── PDFs/
├── document1.pdf
├── document2.pdf
└── ...
Run the container:
docker run -v /path/to/your/input:/app/input -v /path/to/your/output:/app/output challenge1b
Replace /path/to/your/input and /path/to/your/output with your actual paths.
# Build the image
docker build -t challenge1b .
# Run with mounted volumes
docker run \
-v $(pwd)/Collection\ 1:/app/input \
-v $(pwd)/output:/app/output \
challenge1b
This will:
challenge1b_output.json in the output directoryThe system expects a JSON input file with the following structure:
{
"challenge_info": {
"challenge_id": "round_1b_002",
"test_case_name": "travel_planner",
"description": "France Travel"
},
"documents": [
{
"filename": "Document1.pdf",
"title": "Document 1 Title"
},
{
"filename": "Document2.pdf",
"title": "Document 2 Title"
}
],
"persona": {
"role": "Travel Planner"
},
"job_to_be_done": {
"task": "Plan a trip of 4 days for a group of 10 college friends."
}
}
The system generates a comprehensive JSON output with:
{
"metadata": {
"input_documents": ["Document1.pdf", "Document2.pdf"],
"persona": "Travel Planner",
"job_to_be_done": "Plan a trip of 4 days for a group of 10 college friends.",
"processing_timestamp": "2025-07-28T12:00:00.000000"
},
"extracted_sections": [
{
"document": "Document1.pdf",
"section_title": "Travel Planning Guide",
"importance_rank": 1,
"page_number": 1
}
],
"subsection_analysis": [
{
"document": "Document1.pdf",
"refined_text": "Comprehensive content with detailed information...",
"page_number": 1
}
]
}
Document Processing Pipeline
Retrieval System
Persona Integration
Input JSON → PDF Processing → Content Chunking → Index Building →
Persona Query → Bi-encoder Retrieval → Cross-encoder Reranking →
Formatted Output
The system can be configured through command-line arguments in run.py:
--final-results: Number of final results to return (default: 5)--initial-candidates: Number of initial candidates for reranking (default: 50)--retriever-model: Bi-encoder model for initial retrieval--reranker-model: Cross-encoder model for rerankingInstall dependencies:
pip install -r requirements.txt
Run directly:
python main.py input.json --final-results 5 --output-file output.json
main.py: Main processing pipeline with challenge mode supportheading_extractor.py: PDF heading detection and structure analysischunker.py: Content chunking with intelligent aggregationretriever.py: Bi-encoder semantic search implementationreranker.py: Cross-encoder reranking for improved relevancerun.py: Docker container entry pointThe system provides comprehensive logging:
For development and contributions:
This project is part of Challenge 1B submission and follows the challenge guidelines and requirements.
For detailed technical information about our approach, see approach_explanation.md.
1 commits
Python
99.5%
A sophisticated document retrieval system that combines bi-encoder semantic search with cross-encoder reranking to deliver highly relevant, contextually appropriate results for specific user personas and job-to-be-done scenarios.
Build the Docker image:
docker build -t challenge1b .
Prepare your input:
PDFs subdirectory relative to the input JSONExample structure:
input/
├── challenge1b_input.json
└── PDFs/
├── document1.pdf
├── document2.pdf
└── ...
Run the container:
docker run -v /path/to/your/input:/app/input -v /path/to/your/output:/app/output challenge1b
Replace /path/to/your/input and /path/to/your/output with your actual paths.
# Build the image
docker build -t challenge1b .
# Run with mounted volumes
docker run \
-v $(pwd)/Collection\ 1:/app/input \
-v $(pwd)/output:/app/output \
challenge1b
This will:
challenge1b_output.json in the output directoryThe system expects a JSON input file with the following structure:
{
"challenge_info": {
"challenge_id": "round_1b_002",
"test_case_name": "travel_planner",
"description": "France Travel"
},
"documents": [
{
"filename": "Document1.pdf",
"title": "Document 1 Title"
},
{
"filename": "Document2.pdf",
"title": "Document 2 Title"
}
],
"persona": {
"role": "Travel Planner"
},
"job_to_be_done": {
"task": "Plan a trip of 4 days for a group of 10 college friends."
}
}
The system generates a comprehensive JSON output with:
{
"metadata": {
"input_documents": ["Document1.pdf", "Document2.pdf"],
"persona": "Travel Planner",
"job_to_be_done": "Plan a trip of 4 days for a group of 10 college friends.",
"processing_timestamp": "2025-07-28T12:00:00.000000"
},
"extracted_sections": [
{
"document": "Document1.pdf",
"section_title": "Travel Planning Guide",
"importance_rank": 1,
"page_number": 1
}
],
"subsection_analysis": [
{
"document": "Document1.pdf",
"refined_text": "Comprehensive content with detailed information...",
"page_number": 1
}
]
}
Document Processing Pipeline
Retrieval System
Persona Integration
Input JSON → PDF Processing → Content Chunking → Index Building →
Persona Query → Bi-encoder Retrieval → Cross-encoder Reranking →
Formatted Output
The system can be configured through command-line arguments in run.py:
--final-results: Number of final results to return (default: 5)--initial-candidates: Number of initial candidates for reranking (default: 50)--retriever-model: Bi-encoder model for initial retrieval--reranker-model: Cross-encoder model for rerankingInstall dependencies:
pip install -r requirements.txt
Run directly:
python main.py input.json --final-results 5 --output-file output.json
main.py: Main processing pipeline with challenge mode supportheading_extractor.py: PDF heading detection and structure analysischunker.py: Content chunking with intelligent aggregationretriever.py: Bi-encoder semantic search implementationreranker.py: Cross-encoder reranking for improved relevancerun.py: Docker container entry pointThe system provides comprehensive logging:
For development and contributions:
This project is part of Challenge 1B submission and follows the challenge guidelines and requirements.
For detailed technical information about our approach, see approach_explanation.md.
1 commits
Python
99.5%