Skip to content

Commit fd3a3e5

Browse files
committed
RAG & Embedding
modified: docs/genai/04_how_to_guides/02_embeddings.mdx modified: docs/genai/04_how_to_guides/03_retrieval_augmented_generation.mdx
1 parent 7f976ef commit fd3a3e5

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

docs/genai/04_how_to_guides/02_embeddings.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ While Decoder-only LLMs gained massive popularity via their usage in chatbots, E
44

55
```mermaid
66
flowchart LR;
7-
A["String <br> "GenAI can be used for research""]
8-
B["Encoder-only LLM"]
9-
C["Vector embedding <br> [0.052587852, 0.094195396, 0.24439038, 0.104940414, ...]"]
7+
A["natual language text string <br> *GenAI can be used for research*"]
8+
B["encoder-only LLM"]
9+
C["vector embedding <br> [0.052587852, 0.094195396, 0.24439038, 0.104940414, ...]"]
1010
A-- "Input" -->B;
1111
B-- "Output" -->C;
1212
```

docs/genai/04_how_to_guides/03_retrieval_augmented_generation.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,25 @@ Large Language Models only know about the data they were trained upon and do not
55
- newer knowledge past the cutoff date (i.e. the date at which data collection was frozen)
66

77
To get around this issue, one of the most popular techniques is Retrieval-augmented generation.
8+
9+
10+
```mermaid
11+
flowchart TB;
12+
A["Natual language prompt <br> *Can GenAI be used for research?*"]
13+
B["Vector embedding <br> [0.052587852, 0.094195396, 0.24439038, 0.104940414, ...]"]
14+
C["Vector Database <br> embedding1 <br> embedding2 <br> embedding3 <br> ... "]
15+
D["Text with embeddings similar to the prompt"]
16+
E["Original prompt with added context"]
17+
F["Response from LLM using context"]
18+
subgraph Retreival
19+
direction LR
20+
A-- "Embedding" -->B;
21+
B-- "Look for similar embeddings" -->C;
22+
C-- "Generate context" -->D;
23+
end
24+
subgraph Augmented Generation
25+
direction LR
26+
D-- "Expand Prompt" -->E;
27+
E-- "LLM" -->F;
28+
end
29+
```

0 commit comments

Comments
 (0)