Welcome! You've just forked a powerful RAG (Retrieval-Augmented Generation) system. Here's how to get started in under 5 minutes.
Go to Tools → Secrets and add:
OPENAI_API_KEY = sk-your-openai-key-here
VKB_API_KEY = your-custom-api-key-123
SESSION_SECRET = random-string-for-sessions
BASIC_AUTH_USERNAME = admin
BASIC_AUTH_PASSWORD = your-secure-password
Click the Run button and wait for:
Flask application configured successfully
- Web Interface: Click the browser icon or visit your Repl URL
- Login: Use the username/password you set in secrets
- Visit the web interface
- Click "Choose File" and select a PDF
- Click "Upload Document"
- Wait for "Upload successful!"
- Enter a question about your document
- Click "Search"
- See relevant excerpts with similarity scores
# Set your API key
export VKB_API_KEY=your-custom-api-key-123
# Upload a PDF
python utils/upload_tool.py your_document.pdf
# Or use the example script
python example_usage.py- Upload research papers, documentation, books
- Query using natural language
- Great for study notes and reference
- Company documentation search
- Customer support knowledge base
- Internal wiki with semantic search
- Code documentation search
- API reference system
- Technical specification lookup
- Use
/api/uploadto add documents - Use
/api/queryin GPT Actions - Build conversational interfaces over your documents
Edit config.py:
MAX_FILE_SIZE = 50 * 1024 * 1024 # 50MBEdit api/routes.py:
results, error_msg = vector_store.search(
query=query,
k=5, # Return more results
similarity_threshold=0.05 # Lower = more lenient
)Currently supports PDF. To add more formats, modify services/pdf_processor.py.
- Health Check: Visit
/monitoring/health - Database Stats: Visit
/monitoring/database-diagnostic - OpenAI Test: Visit
/monitoring/test-openai
- Check that
OPENAI_API_KEYis set in Replit Secrets - Verify your OpenAI API key is valid and has credits
- Ensure
BASIC_AUTH_USERNAMEandBASIC_AUTH_PASSWORDare set - Try logging out and back in
- Check file size is under the limit
- Ensure the file is a valid PDF
- Check console logs for detailed errors
- Upload documents first
- Try broader search terms
- Check similarity threshold settings
- Full Documentation: See the
docs/folder - API Reference:
docs/api_specification.md - Privacy Guide:
docs/privacy_and_pii_protection.md - Backup System:
docs/BackupSystem.md
- Check the console logs
- Visit
/monitoring/healthfor diagnostics - Review the documentation in
docs/ - Look at
example_usage.pyfor API examples
Happy building! 🚀