Fix Poor Retrieval Accuracy in Our RAG-Based AI Agent (FastAPI + OpenAI)

Posted yesterday

Worldwide

Summary

We have an AI agent in production that answers questions over our company documents using RAG, but the retrieval quality has gotten unreliable and we need it fixed. The main problems: 1. It misses answers that are clearly in the docs the right information exists, but the agent says it doesn't know or returns something unrelated. 2. It sometimes hallucinates answers confidently with information that isn't in our knowledge base. 3. Citations are off when it does cite a source, it often points to the wrong document or chunk. The stack is FastAPI + OpenAI + a vector database (pgvector / Pinecone). The pipeline works end-to-end this is a quality/accuracy problem, not a "build from scratch" job. Scope: - Diagnose why relevant chunks aren't being retrieved (embeddings, chunking, or search config) - Improve retrieval accuracy review chunking strategy, add hybrid search / reranking if needed - Tighten the prompt + grounding so the agent stops answering outside the retrieved context (reduce hallucinations) - Fix citation/source mapping so answers point to the correct document - Show before/after on a few real test questions Deliverables: - Retrieval accuracy noticeably improved on our test questions - Hallucinations reduced / properly grounded answers - A short explanation of what was wrong and what you changed You're a good fit if you have: - Proven production RAG experience (not just tutorials) - Strong grasp of embeddings, chunking, vector search, reranking, and hybrid search - Worked with pgvector / Pinecone, OpenAI, and FastAPI - Experience reducing hallucinations and grounding LLM answers

  • $200.00

    Fixed-price
  • Intermediate
    Experience Level
  • Remote Job
  • One-time project
    Project Type
Skills and Expertise
Mandatory skills
Python
FastAPI
OpenAI (GPT-4o + embeddings)
Activity on this job
  • Proposals:20 to 50
  • Interviewing:
    0
  • Invites sent:
    0
  • Unanswered invites:
    0
About the client
Member since Sep 28, 2025
  • United States Minor Outlying Islands
    New York3:54 PM
  • $3.7K total spent
    199 hires, 11 active
  • 65 hours

Explore similar jobs on Upwork

AI Agent Development
AI Implementation
Chatbot Development
Gen AI Developer (Contract)Fixed-price‐ Posted 1 month ago
AI Agent Development
Python
JavaScript
API
Node.js
Deep Learning
React
PostgreSQL

How it works

  • Post a job icon
    Create your free profile
    Highlight your skills and experience, show your portfolio, and set your ideal pay rate.
  • Talent comes to you icon
    Work the way you want
    Apply for jobs, create easy-to-by projects, or access exclusive opportunities that come to you.
  • Payment simplified icon
    Get paid securely
    From contract to payment, we help you work safely and get paid securely.
Want to get started? Create a profile

About Upwork

  • Rating is 4.9 out of 5.
    4.9/5
    (Average rating of clients by professionals)
  • G2 2021
    #1 freelance platform
  • 49,000+
    Signed contract every week
  • $2.3B
    Freelancers 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

  • Microsoft Logo
  • Airbnb Logo
  • Bissell Logo
  • GoDaddy Logo