Live: portafolio-chi-two-17.vercel.app
Trilingual portfolio (EN / ES / RU) with AskMaria built in — a Retrieval-Augmented Generation (RAG) assistant that answers recruiters' questions about my experience, projects and skills, in three languages, grounded in my actual documents.
Try it: open the portfolio, click the ✦ button and ask "Has Maria worked with Docker?" — or ask in Spanish or Russian.
Ingestion pipeline (scripts/ingest.ts):
- Markdown documents about my experience (
docs/) are split into ~500-char chunks by paragraph boundaries - Each chunk is prefixed with its source and embedded with bge-m3 (Cloudflare Workers AI) → a 1024-dimension vector
- Chunks + embeddings are stored in PostgreSQL with pgvector
Query pipeline (app/api/ask/route.ts):
- Retrieval — the question is embedded with the same model, and the top-8
nearest chunks are retrieved via k-NN cosine search (pgvector's
<=>operator) - Augmentation — retrieved chunks are injected into the system prompt with source attribution and anti-hallucination rules
- Generation — Llama 3.1 8B answers in the user's language (ES/EN/RU), with a sanitization layer cleaning the model's output before it reaches the UI
| Layer | Tech |
|---|---|
| Frontend | Next.js 16 (App Router), TypeScript, Tailwind CSS |
| i18n | next-intl — localized routes /en /es /ru |
| Vector DB | PostgreSQL + pgvector (Supabase in production, Docker locally) |
| Embeddings | Cloudflare Workers AI — bge-m3 (multilingual, 1024 dims) |
| LLM | Cloudflare Workers AI — llama-3.1-8b-instruct |
| ORM | Prisma 6 (raw SQL for vector operations) |
| Deploy | Vercel (CI/CD from this repo) |
- Multilingual retrieval: bge-m3 embeds semantically across languages, so a question in Russian retrieves relevant chunks written in English
- Prisma + pgvector: the
vector(1024)column uses Prisma'sUnsupportedtype; vector queries run through$queryRaw— the ORM handles everything else - Defense in depth: formatting rules live in the system prompt AND in a post-processing sanitization step — LLM output is never trusted blindly
npm install
# Env vars (see .env.example): DATABASE_URL, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN
npx prisma migrate dev # schema + vector extension
npx tsx scripts/ingest.ts # chunk + embed + store the docs
npm run devBuilt by Maria Juliana Arias · GitHub · Kazan, Russia