Interfacing with RAG Flashcards

(55 cards)

1
Q

What does RAG stand for?

A

Retrieval-Augmented Generation

RAG is an AI technique that combines information retrieval with text generation to improve response accuracy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the four main components of the RAG workflow?

A
  • User asks a question
  • Retrieval step
  • Augmentation step
  • Generation step

These steps outline how RAG processes a user query to generate an answer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In the retrieval step of RAG, what method is used to search an external knowledge base?

A

Semantic search (embedding-based matching)

This method helps retrieve the most relevant documents or snippets based on the user’s query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the augmentation step involve in RAG?

A

Passing retrieved information to the language model along with the user’s question

This provides context-specific information to the model for generating answers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List the benefits of using RAG.

A
  • More up-to-date answers
  • Better factual accuracy
  • Reduced hallucinations
  • Custom knowledge
  • Smaller models can perform better

These advantages make RAG a powerful approach for generating responses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or false: RAG relies solely on the training data of the language model for generating answers.

A

FALSE

RAG retrieves relevant information at query time, enhancing the model’s responses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a simple analogy for understanding RAG?

A

A student answering questions with a textbook

The process involves retrieval, augmentation, and generation similar to how a student finds and uses information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the first step in the RAG architecture?

A

User Query

This initiates the RAG process, leading to the retrieval and generation of answers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Fill in the blank: In RAG, after embedding the query, the next step is to access the _______.

A

Vector store / Search index

This step is crucial for retrieving the top-k documents relevant to the user’s query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the LLM do in the final step of the RAG architecture?

A

Generates grounded answer

The LLM uses both the retrieved text and its reasoning abilities to produce a coherent response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a strength of Retrieval-Augmented Generation (RAG) systems regarding knowledge?

A
  • Grounded in external knowledge
  • Reduces hallucinations
  • More updatable than raw fine-tuning
  • Better controllability & compliance
  • Good fit for enterprise & long-tail questions

RAG systems can pull from various sources, making them suitable for rapidly changing domains.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the Green flag indicate in beach safety?

A

Safe, open conditions for swimming

Beach flags are a universal system to communicate water safety conditions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a weakness of RAG systems related to retrieval?

A
  • Highly dependent on retrieval quality
  • Complex system to build and maintain
  • Context window + formatting constraints
  • Still can hallucinate
  • Non-trivial evaluation

Poor retrieval can lead to incorrect or misleading answers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are some opportunities for RAG systems?

A
  • Tight integration with existing enterprise data
  • Hybrid architectures
  • Personalization and role-based views
  • Advanced retrieval methods
  • Governance, observability, and safety products

These opportunities can enhance the effectiveness and relevance of RAG systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a threat to RAG systems regarding alternatives?

A
  • Better alternatives for some use cases
  • Data-leak and privacy risks
  • Operational & cost blowups
  • Overconfidence and misuse
  • Vendor/platform lock-in

Alternatives may outperform RAG in specific scenarios, and risks exist in data handling and operational costs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Fill in the blank: RAG systems can pull from _______, databases, APIs, etc.

A

docs

This allows RAG systems to provide up-to-date information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

True or false: RAG systems are always more efficient than traditional fine-tuning methods.

A

FALSE

While RAG systems have advantages, they also have weaknesses that can affect efficiency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does a Red flag signify in beach safety?

A

Unsafe conditions, closed for swimming

Beach flags communicate safety conditions to the public.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is a benefit of RAG systems regarding updates?

A

Updating the knowledge base is cheaper and faster than retraining

This allows organizations to keep their models current without extensive retraining.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a risk associated with RAG systems in terms of data handling?

A

Misconfigured retrieval indices can expose sensitive docs

This poses a significant compliance risk for organizations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is a characteristic of RAG systems related to user-specific retrieval?

A

User-specific retrieval leads to more relevant answers

This personalization can enhance the user experience.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What does Generative AI (GenAI) encompass?

A
  • Text generation
  • Image generation
  • AI agents
  • Enterprise automation
  • Reasoning engines

GenAI has evolved to power complex systems beyond basic generation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is RAG in the context of Generative AI?

A

Retrieval-Augmented Generation

RAG combines retrieval from external knowledge sources with LLM generation to enhance factual accuracy.

24
Q

Define LLM.

A

A type of AI model trained on vast amounts of text data to understand and generate human-like language

Examples include GPT-01, Claude, and LLaMA.

25
What is **prompting**?
A technique for designing input instructions to guide LLM outputs ## Footnote Examples: "Write a summary in 3 sentences," "Answer as a cybersecurity expert."
26
What are **prompt templates**?
Reusable, structured prompts with placeholders for dynamic inputs ## Footnote Example: "Explain {concept} like I'm 5 years old."
27
What is a **retriever** in Generative AI?
A system component designed to fetch relevant information from a dataset or database ## Footnote Examples: Vector similarity search using FAISS, Elasticsearch.
28
What is an **agent** in the context of AI?
An autonomous AI system that can plan, reason, and execute tasks using tools ## Footnote Examples: AutoGPT, LangChain Agents.
29
Define **multi-agent system**.
A framework in which multiple AI agents collaborate to solve complex tasks ## Footnote Examples: Microsoft AutoGen, CrewAI.
30
What does **chain-of-thought** refer to?
A prompting technique that encourages models to decompose problems into intermediate steps ## Footnote Example: "Let's think step by step…"
31
What is **hallucination mitigation**?
Strategies to reduce incorrect or fabricated outputs from LLMs ## Footnote Techniques include RAG, fine-tuning, and prompt constraints.
32
What is a **vector database**?
A database optimized for storing and querying vector embeddings ## Footnote Examples: Pinecone, Chroma, Weaviate.
33
What does **orchestration** involve?
Tools to manage and coordinate workflows involving multiple AI components ## Footnote Examples: LangChain, LlamaIndex.
34
What is **fine-tuning**?
Adapting pre-trained models for specific tasks using domain-specific data ## Footnote Examples: LoRA (Low-Rank Adaptation), QLoRA (quantized fine-tuning).
35
What is **Hugging Face**?
A platform hosting pre-trained models and datasets for NLP tasks ## Footnote Examples: Accessing GPT-2, BERT, Stable Diffusion.
36
What is **LangChain** used for?
A framework for building applications with LLMs, agents, and tools ## Footnote Example: Creating chatbots with memory and web search.
37
What does **AutoGen** do?
A library for creating multi-agent conversational systems ## Footnote Example: Simulating debates between AI agents.
38
What is **CrewAI**?
A framework for assembling collaborative AI agents with role-based tasks ## Footnote Example: Task automation with specialized agents.
39
What is **BeeAI**?
A lightweight framework to build production-ready multi-agent systems ## Footnote Example: Distributed problem-solving systems.
40
What does **LlamaIndex** connect?
Connects LLMs to structured or unstructured data sources ## Footnote Example: Building Q&A systems over private documents.
41
What is **Few-Shot Prompting**?
Providing examples in the prompt to guide the model's output format ## Footnote Example: "Translate to French: 'Hello' → 'Bonjour'; 'Goodbye' → __.”
42
Define **Zero-Shot Prompting**.
Directly asking the model to perform a task without examples ## Footnote Example: "Classify this tweet as positive, neutral, or negative: {tweet}.”
43
What is **prompt chaining**?
Breaking complex tasks into smaller prompts executed sequentially ## Footnote Example: Prompt 1: Extract keywords → Prompt 2: Generate summary from keywords.
44
Describe the **RAG Pipeline**.
* Retrieval: Query vector database (for example, Pinecone) for context * Augmentation: Combine context with user prompt * Generation: LLM (for example, GPT-4) produces final output ## Footnote This pipeline enhances the accuracy and relevance of generated content.
45
What are the components of a **Multi-Agent System**?
* Agents: Specialized roles (for example, researcher, writer, critic) * Orchestration: LangGraph for cyclic workflows, AutoGen for conversations * Tools: Web search, code execution, API integrations ## Footnote This system allows for collaborative problem-solving among AI agents.
46
Is **RAG** a type of **generative model**?
Not exactly ## Footnote RAG is a *pattern* that usually *uses* generative AI, but it isn’t itself a type of generative model.
47
What does **Generative AI** do?
Produces new content ## Footnote Examples include GPT-style LLMs that output text and image models that output pictures.
48
Mathematically, generative models model something like _______.
p(output | input) ## Footnote This represents the probability of the output given the input.
49
What does **RAG** stand for?
Retrieval-Augmented Generation ## Footnote It is an architecture that combines retrieval and generation components.
50
What are the two main components of **RAG**?
* Retriever * Generator ## Footnote The retriever pulls relevant documents, while the generator produces answers using those documents.
51
What is the role of the **Retriever** in RAG?
Pulls relevant documents/passages ## Footnote It searches a knowledge base for information relevant to the query.
52
What does the **Generator** do in RAG?
Produces an answer using retrieved context ## Footnote It typically uses a generative model, usually an LLM.
53
The **generator inside RAG** is considered _______.
Generative AI ## Footnote It is the component that generates content based on the input and retrieved context.
54
RAG is better described as a **system design** or _______.
Paradigm ## Footnote It utilizes generative AI with an external memory.
55
When someone refers to a **RAG model**, they usually mean a generative model _______.
Used inside a RAG pipeline ## Footnote This highlights the integration of generative models within the RAG architecture.