Build a Mini RAG FAQ Assistant (Next.js + AI)

Job ID: 40281283

Budget: $30 – $250 USD

I am seeking a freelance developer to create a small FAQ assistant web application utilizing Retrieval-Augmented Generation (RAG). This project is paid and will serve as a practical evaluation for potential longer‑term work on similar AI features.

What we need built
- A simple Next.js web app (App Router, TypeScript preferred) with:
• One page containing:
A text input/textarea for a user question.
A submit button.
An answer area directly under the input, with clear, modern styling.
- A backend route (e.g., app/api/ask/route.ts) that:
• Accepts a JSON payload { question: string }.
• Uses local text embeddings (e.g., @xenova/transformers or similar) to find relevant snippets from a small docs/ folder.
• Calls the Perplexity AI Chat Completions API (e.g., sonar model, set via environment variable).
• Returns a JSON response containing the generated answer and the sources used.
- A simple indexing step/script to:
• Read the docs.
• Split them into chunks.
• Compute and store embeddings for retrieval (e.g. in a JSON file).

Deliverables
- Git repository with:
• Frontend and backend code.
• A docs/ folder with example content.
• A short README explaining:
o Set up and installation.
o Required environment variables (Perplexity API key, model name).
o How to build the index and run the app locally.
Brief note on your design decisions and possible next improvements (1–2 paragraphs).

Required skills
- Strong experience with Next.js and React.
- Familiarity with calling external APIs (REST) and handling JSON.
- Basic understanding of vector embeddings and RAG is a plus (or willingness to learn).

Payment & evaluation
- This is a paid fixed‑price project, not an unpaid test.
- Successful completion with clean, understandable code and clear documentation may lead to follow‑up projects and ongoing work.