A hands-on codealong project that demonstrates how to build a banking document workflow application with semantic search and retrieval augmented generation (RAG).
- Build a functional web application with Django to serve as your workflow interface.
- Implement semantic search and retrieval augmented generation using MongoDB Atlas Vector Search and Voyage AI.
- Get hands-on with a practical banking workflow use case, from document retrieval to automated task handling.
- Python 3.12+
- A MongoDB Atlas cluster (free tier works)
- A Voyage AI API key
-
Clone the repository and checkout the starter branch:
git clone <repo-url> cd banking-workflow-codealong git checkout starter
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the project root:SECRET_KEY=your-secret-key-here DB_ENGINE=django_mongodb_backend MONGODB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/?appName=bankflow DB_NAME=banking_workflow VOYAGE_API_KEY=your-voyage-ai-key -
Run migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
-
Visit http://127.0.0.1:8000/ in your browser.
banking/ # Main application
├── models.py # BankingDocument & WorkflowTask models
├── views.py # View functions for all pages
├── forms.py # Django forms
├── urls.py # URL routing
├── admin.py # Admin configuration
├── services/
│ ├── embedding_service.py # Voyage AI embeddings
│ ├── vector_search_service.py # MongoDB Atlas Vector Search
│ └── rag_service.py # RAG pipeline
└── templates/banking/ # HTML templates
main— Complete solution with all features implementedstarter— Skeleton with TODOs for the codealong
Create this index on the banking_bankingdocument collection in your Atlas cluster.
Index name: banking_embedding_index
{
"fields": [
{
"type": "vector",
"path": "embedding",
"numDimensions": 1024,
"similarity": "cosine"
}
]
}