Python Developer for Backend Task
Worldwide
need a single, production-quality retrieval-augmented (RAG) API endpoint built in Python. This is a one-time task, not an ongoing role. You will deliver one FastAPI service that ingests a set of documents into a Postgres + pgvector store, then answers questions over them through a single /chat endpoint backed by an LLM. What you will build 1. Ingestion script - Load a folder of provided documents (PDF and .txt). - Chunk the text, generate embeddings, and upsert them into PostgreSQL using pgvector. - Idempotent: re-running should not create duplicates. 2. /chat endpoint (FastAPI) - Runs cosine similarity search over pgvector to retrieve the top-k chunks. - Passes the retrieved context to an LLM via LangChain and returns a structured JSON response: the answer plus the source chunks used. 3. Basics done right - Pydantic request/response models. - Config via environment variables (DB URL, model/API key). - A README with setup and run instructions. - A docker-compose that spins up Postgres + pgvector so I can run it locally in one command. Tech stack (required) - Python 3.11+, FastAPI - PostgreSQL + pgvector (HNSW or IVFFlat index) - LangChain for the retrieval + LLM call - Embeddings: OpenAI text-embedding-3-small (or an open model such as bge-m3, your choice) - Docker / docker-compose Acceptance criteria - I can clone, run docker-compose up, run the ingestion script, and hit /chat successfully within 15 minutes using the README. - /chat returns a relevant answer plus the source chunks for a question about the sample documents. - No hardcoded secrets; keys read from env. To apply - Share one relevant RAG or FastAPI sample you have built. - Confirm the scope and $150 fixed price. - Give a realistic delivery time (I expect 2 to 4 days).
$150.00
Fixed-price- IntermediateExperience Level
- Remote Job
- One-time projectProject Type
Skills and Expertise
Activity on this job
- Proposals:50+
- Interviewing:0
- Invites sent:0
- Unanswered invites:0
About the client
- United StatesDublin4:39 PM
- $13K total spent69 hires, 2 active
- 345 hours
- Engineering & ArchitectureIndividual client
Explore similar jobs on Upwork
How it works
Create your free profileHighlight your skills and experience, show your portfolio, and set your ideal pay rate.
Work the way you wantApply for jobs, create easy-to-by projects, or access exclusive opportunities that come to you.
Get paid securelyFrom contract to payment, we help you work safely and get paid securely.
About Upwork
- 4.9/5(Average rating of clients by professionals)
- G2 2021#1 freelance platform
- 49,000+Signed contract every week
- $2.3BFreelancers earned on Upwork in 2020
Find the best freelance jobs
Growing your career is as easy as creating a free profile and finding work like this that fits your skills.
Trusted by