Architecture of a Scientific AI Agent: RAG, Embeddings, and Trusted Sources

Delve into the technological foundations that enable AI agents such as Charlie to provide accurate, sourced, and reliable answers for biomedical research.

Emerit Science

Emerit Science Team

January 2026 Updated November 2, 2026
Architecture of an AI Agent - RAG, Embeddings, and Trusted Sources

The effectiveness of a scientific AI agent relies on a sophisticated technical architecture that fundamentally differentiates it from generic chatbots. Unlike a traditional language model that simply generates text based on its initial training, an agent such as Charlie relies on a Retrieval-Augmented Generation (RAG) architecture that combines the power of language generation with the accuracy of real-time information retrieval.

This multi-layer architecture ensures that every answer provided is grounded in verifiable scientific sources rather than probabilistic “hallucinations”. RAG lets the agent first retrieve the relevant information from authoritative scientific databases (PubMed, HAL, bioRxiv, PMC, patent data), then synthesize that information coherently while maintaining full traceability back to the original sources.

Semantic embeddings are at the heart of the search system. Rather than searching for exact keyword matches, Charlie transforms each scientific concept into a high-dimensional mathematical vector that captures its deep semantic meaning. This vector representation makes it possible to find conceptually relevant publications even if they use different terminology—an essential capability given the diversity of scientific language.

Source reliability rests on several levels. By default, Charlie queries recognized academic databases; Internet remains a source you can check, unchecked by default. You can filter by article type and number of citations, and Charlie takes the study type and citations of each publication into account. This rigor turns AI from a text generator into a true scientific research assistant.

In 2026, understanding this architecture is no longer reserved for engineers: it is essential for any researcher who wants to use AI in an informed way, evaluate the reliability of the tools at their disposal, and understand why not all "AI assistants" are equally suitable for scientific research. Architecture determines the difference between a tool that is useful and one that is dangerous for scientific rigor.

RAG: The Core of Scientific AI Agent Architecture

Retrieval-Augmented Generation (RAG) represents a paradigm shift from traditional language models. Instead of relying solely on parameters learned during initial training (which quickly become obsolete in a field as dynamic as scientific research), RAG outsources knowledge to living databases that are constantly updated with the latest publications.

Charlie's RAG process works in three distinct phases. Phase 1: Retrieval — When you ask a question, the agent analyzes your intent, turns the question into optimized search queries, and queries the sources you have checked, by default the Emerit Corpus (PubMed, HAL, bioRxiv), to retrieve the most relevant documents. This step uses semantic embeddings to find not only the obvious lexical matches but also conceptually related publications.

Phase 2: Augmentation — The retrieved documents are preprocessed, filtered by quality, and their key information is extracted: main results, methodologies, conclusions, limitations. This information is then integrated into the language model's generation context, effectively "augmenting" its knowledge with verifiable and current facts. This temporary augmentation is specific to your question and does not persist beyond the current exchange.

Phase 3: Generation — The language model synthesizes the retrieved information into a coherent, structured answer, adapted to your level of expertise and your research context. A crucial difference: generation is constrained by the retrieved sources. Charlie relies on the documents it found rather than inventing information that is absent. Every claim is traceable to its original source with a precise reference (DOI, PMID, patent number).

  • High-Performance Vector Databases: Charlie uses a vector database containing millions of scientific publication embeddings, which enables semantic searches across the corpus, combined with keyword search
  • Embedding Model: An embedding model dedicated to semantic search, which brings together texts of the same meaning, even when worded differently
  • Intelligent Re-Ranking: After initial retrieval, a re-ranking model trained on biomedical literature evaluates the fine-grained relevance of each document for your specific question, prioritizing the most directly applicable publications
  • Biomedical Vocabulary: Query expansion with MeSH terms and the record of the gene named in the question (name, aliases, identifiers), so that the answer does not invent an identifier
  • Multi-Source Aggregation: Intelligent fusion of information from different databases with conflict resolution, consensus detection, and identification of scientific controversies.
"What's impressive about Charlie is its traceability. Unlike ChatGPT, which can generate non-existent references, every statement made by Charlie points to an actual publication that I can verify. This RAG architecture transforms AI from a risk to scientific integrity into a reliable research accelerator." — Dr. Sophie Chen, Data Manager, INSERM

Semantic Embeddings: Understanding Scientific Language in Depth

Embeddings (vector representations) are the technology that enables Charlie to "understand" the meaning of scientific concepts rather than simply comparing strings of characters. Technically, an embedding transforms a text (word, sentence, paragraph, or entire document) into a high-dimensional vector of numbers (typically 768 or 1536 dimensions) where semantically similar texts are mathematically close in this vector space.

For scientific research, this capability is crucial because the same concept can be expressed in dozens of different ways. For example, "CRISPR-Cas9," "CRISPR genome editing," "CRISPR/Cas9 system," "RNA-guided Cas9 nuclease," and "CRISPR-based gene editing" essentially represent the same concept. High-quality embeddings place all these terms in the same region of the vector space, allowing Charlie to recognize them as equivalent even if the exact words differ.

Charlie pairs these embeddings with a reranking model trained on biomedical literature and an expansion by MeSH terms. This combination captures not only obvious synonyms but also complex conceptual relationships: protein-gene relationships, drug-target interactions, disease-symptom associations, taxonomic hierarchies, cause-effect relationships, and methodological nuances. This understanding enables far more sophisticated searches than simple keyword matching.

The quality of the embeddings directly determines the quality of the results. A poorly trained embedding could confuse “p53 mutation” and “p53 expression”, or miss the connection between “anti-PD-1 immunotherapy” and “checkpoint inhibitor therapy”. That is why Charlie does not rely on vector proximity alone: it combines it with keyword search and a PubMed search, then reranks the results before using them.

RAG architecture Vector embeddings

Ensuring the Reliability of Sources: A Fundamental Responsibility

The credibility of a scientific AI agent rests entirely on the reliability of its sources. By default, Charlie queries the Emerit Corpus: PubMed (National Library of Medicine), HAL and bioRxiv, with PMC full text queried separately. Patents from the European Patent Office and your libraries are sources you can check. Internet is unchecked by default: its results are used only if you check it, and they are ranked by source quality and cited with their address.

Beyond the selection of databases, Charlie gives you levers on methodological quality. You can restrict a search by article type (randomized controlled trials, meta-analyses, systematic reviews), by number of citations, by language or by source, except on PMC full text. Dedicated channels surface highly cited and recent articles, and Charlie sees the study type and number of citations of each article when it writes.

A crucial mechanism is hallucination detection. Unlike conventional LLMs, which can generate plausible but entirely invented bibliographic references (a major problem for scientific integrity), Charlie's RAG architecture ensures that every cited reference actually exists and was retrieved from a queried source. If a piece of information cannot be sourced, Charlie says so explicitly rather than inventing it. This intellectual honesty is fundamental to maintaining researchers' trust.

Finally, complete traceability allows for human verification. Each statement in a Charlie response is accompanied by its source (DOI, PMID, patent number, GEO dataset identifier), allowing researchers to trace it back to the original publication, verify the context, evaluate the methodology, and judge its relevance for themselves. This transparency transforms Charlie from a "black box" into an assistance tool where researchers retain control and ultimate intellectual responsibility.

Charlie Multi-Layer Architecture

  1. Layer 1: Conversational Interface — Natural language processing enabling questions in French or English, maintaining conversational context, interactive clarification, adaptation to the user's level of expertise
  2. Layer 2: Planning Agent — Breaking down complex queries into subtasks, orchestrating queries to different databases, managing dependencies between successive searches, optimizing execution order
  3. Layer 3: RAG system — Semantic transformation of the question into embeddings, vector search in indexed databases, retrieval of the top-k most relevant documents, contextual re-ranking, extraction of key information
  4. Layer 4: Validation and Filtering — Assessment of methodological quality, verification of consistency between sources, detection of scientific contradictions, identification of the level of consensus, marking of preliminary information
  5. Layer 5: Generation and Synthesis — Language model generating the final answer, formatting with inline citations, hierarchical structuring, adaptation of tone and technicality, anti-hallucination verification
  6. Layer 6: Compliance and Security — Encryption of user data, GDPR compliance, traceability of interactions with the models, isolation of data between users, no use of conversations for retraining

Architectural Differences: AI Agent vs. Generic LLM

Understanding what architecturally distinguishes Charlie from a general-purpose assistant is essential. A generic LLM works in “closed-book” mode: it answers only from its internal parameters learned during initial training. These parameters freeze knowledge at the training cutoff date (typically 6-12 months before deployment). Any later publication is invisible to the model, creating a major problem for a field as dynamic as biomedical research.

An AI agent with a RAG architecture like Charlie works in “open-book” mode: it dynamically accesses external databases at query time, retrieving recent publications. This constant currency is impossible for a conventional LLM. In addition, RAG largely eliminates the hallucination problem: since generation is constrained by the sources actually retrieved, the agent sticks to what the documents it cites say.

Traceability is another fundamental architectural difference. A generic LLM generates text without being able to cite verifiable sources (or worse, invents references that seem plausible but do not exist). Thanks to RAG, Charlie maintains an explicit link between each piece of information it provides and the source document it comes from. This traceability is not a feature added as an afterthought, but an intrinsic property of the RAG architecture.

Finally, disciplinary specialization is built into the architecture. Charlie uses a reranker trained on biomedical literature, prompts optimized for biomedical language, filters by study type and by citations, and structured vocabularies such as MeSH. This multi-level specialization produces expertise far superior to that of a generalist model “sprinkled” with a few scientific prompts.

Experience AI Architecture Designed for Science

Discover how Charlie's RAG architecture transforms the reliability and relevance of AI assistance for your research. Each answer is sourced, verifiable, and rooted in authoritative scientific literature.

Try Charlie for Free

Share this article: