Editing
Retrieval-Augmented Generation
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Creating</span> == Designing a production RAG system: '''1. Document pipeline architecture''' <syntaxhighlight lang="text"> Document Sources (PDFs, web, DB, APIs) β [Ingestion service: parse, clean, deduplicate] β [Chunking: semantic or recursive, 500-1000 tokens] β [Embedding model: text-embedding-3-small or BGE-M3] β [Vector store: Pinecone / Weaviate / pgvector] β [Metadata index: BM25 for hybrid search] </syntaxhighlight> '''2. Query pipeline architecture''' <syntaxhighlight lang="text"> User Query β [Query rewriting / expansion] β [Hybrid retrieval: semantic + BM25 keyword] β [Reranking: cross-encoder or Cohere Rerank API] β [Context assembly: top 5β10 chunks + metadata] β [Prompt construction: system + context + query] β [LLM generation with citation extraction] β [Post-processing: source validation, confidence scoring] β Response + Citations </syntaxhighlight> '''3. Key design decisions''' * Embedding model: balance quality vs. cost (BGE-M3 is strong open-source; text-embedding-3 for OpenAI ecosystem) * Chunk size: 512β1024 tokens; larger for narrative text, smaller for dense technical docs * Hybrid search (semantic + BM25) outperforms either alone on most benchmarks * Always return source citations to build user trust and enable verification [[Category:Artificial Intelligence]] [[Category:Large Language Models]] [[Category:Natural Language Processing]] </div>
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information