Our Lisbon RAG development follows a structured methodology: (1) Data assessment (week 1): understanding your knowledge. Document inventory: cataloguing all data sources for the RAG system — documents, databases, wikis, emails, and external sources. Portuguese documents: assessing Portuguese document quality — OCR quality for scanned PDFs, text extraction accuracy, and encoding. Data classification: classifying data by sensitivity — public (can be processed by external LLM API), confidential (requires private LLM deployment), and personal (requires GDPR compliance measures). Volume: measuring total knowledge base size — determining infrastructure requirements. Quality: assessing document quality — well-structured documents producing better retrieval than poorly formatted content. (2) RAG architecture (weeks 1-2): designing the system. Architecture: designing the RAG pipeline components. Document processing: PDF extraction, OCR for scanned documents, HTML parsing, and structured data extraction. Portuguese processing: handling Portuguese PDF layouts, Portuguese OCR (particularly for older documents with Portuguese typography), and Portuguese table extraction. Chunking: splitting documents into retrievable chunks. Strategy: semantic chunking (splitting at topic boundaries), fixed-size with overlap (simpler but effective), or hierarchical (parent-child chunks for context). Portuguese chunking: respecting Portuguese paragraph structures, sentence boundaries, and document formatting conventions. Chunk size: typically 500-1,000 tokens — balancing retrieval precision with context completeness. Embeddings: converting chunks to vector representations. Model selection: multilingual-e5-large (strong multilingual performance), BGE-M3 (excellent for Portuguese), or Portuguese-fine-tuned models for maximum Portuguese retrieval quality. Portuguese testing: evaluating embedding quality with Portuguese query-document pairs — ensuring Portuguese queries retrieve relevant Portuguese documents. Vector store: storing embeddings for fast similarity search. Options: Pinecone (managed, scalable), Weaviate (open-source, flexible), Qdrant (performant, open-source), pgvector (PostgreSQL extension — simplest for smaller deployments), or Chroma (lightweight, good for development). Portuguese: vector store supporting Portuguese text metadata for hybrid search (vector + keyword). LLM: generating answers from retrieved context. Model: GPT-4o (strong Portuguese), Claude (good reasoning + Portuguese), Llama 3 (open-source, deployable locally for data sensitivity), or Mistral (European, multilingual). Portuguese generation: system prompt establishing European Portuguese output, citation format, and response structure. (3) Development (weeks 2-4): building the pipeline. Ingestion pipeline: automated document processing — new documents added to the knowledge base automatically processed, chunked, embedded, and indexed. Portuguese pipeline: handling Portuguese PDF extraction (including scanned documents with Portuguese OCR), Portuguese text cleaning (removing headers/footers, page numbers), and Portuguese metadata extraction (titles, dates, authors). Retrieval: building the retrieval system. Hybrid: combining vector search (semantic similarity) with keyword search (exact term matching) — hybrid retrieval outperforming either alone for Portuguese. Reranking: retrieved candidates reranked by a cross-encoder model — improving precision by re-evaluating relevance with full query-document attention. Portuguese reranking: cross-encoder trained on Portuguese data or multilingual model with strong Portuguese performance. Generation: building the answer generation pipeline. Context injection: retrieved documents injected into LLM prompt — formatted for readability with source identification. Answer generation: LLM generating answer grounded in retrieved context — instructed to cite sources and indicate confidence. Citation: every claim in the answer linked to the source document — enabling verification. Portuguese generation: answers in European Portuguese with proper grammar, vocabulary, and register. (4) Evaluation (weeks 3-4): measuring quality. Retrieval evaluation: measuring retrieval quality — precision (are retrieved documents relevant?), recall (are all relevant documents retrieved?), and MRR (is the best document ranked first?). Portuguese benchmark: creating Portuguese evaluation dataset — 200+ question-document pairs covering representative queries. Generation evaluation: measuring answer quality — accuracy (factually correct per source documents), completeness (answering the full question), faithfulness (not adding information not in the sources), and language quality (natural European Portuguese). Human evaluation: Portuguese-speaking evaluators assessing answer quality — verifying factual accuracy and Portuguese language naturalness. End-to-end: measuring the complete system — answer accuracy, response time, and user satisfaction. Iteration: improving based on evaluation — adjusting chunking, tuning retrieval, and refining generation prompts. (5) Deployment (weeks 4-5): launching the system. Interface: deploying the RAG interface — chat interface (conversational Q&A), search interface (document search with AI summary), API (integration into existing tools), or Slack/Teams bot (accessible within existing workflow tools). GDPR: data processing documentation, privacy notices, and user consent where required. Access control: role-based access — different users seeing different document subsets based on their permissions. Monitoring: tracking system performance — query volume, response quality, retrieval relevance, and user satisfaction. Portuguese monitoring: monitoring Portuguese language quality in responses — flagging Brazilian Portuguese output or grammatical errors. Knowledge base maintenance: processes for keeping the knowledge base current — automated document ingestion for new content, version management for updated documents, and deletion for removed content.