You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/llm-agentic-tool-mesh-empowering-gen-ai-with-retrieval-augmented-generation-rag.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,22 +29,22 @@ RAG is a technique that enhances the capabilities of language models by providin
29
29
30
30
This approach improves the accuracy and relevance of generated responses, especially in domains requiring up-to-date or specialized information. The key benefits of RAG are:
31
31
32
-
***Enhanced accuracy**: By accessing external data, models can provide more precise and factual responses.
33
-
***Domain specialization**: Enables models to handle specialized topics by leveraging domain-specific documents.
34
-
***Reduced hallucinations**: Minimizes the generation of incorrect or nonsensical information by grounding responses in real data.
32
+
***Enhanced accuracy**: Provides more precise and factual responses by accessing more data available externally
33
+
***Domain specialization**: Enables models to handle specialized topics by leveraging domain-specific documents
34
+
***Reduced hallucinations**: Minimizes the generation of incorrect or nonsensical information by grounding responses in real data
35
35
36
36
# RAG in LLM Agentic Tool Mesh
37
37
38
-
In the LLM Agentic Tool Mesh platform, RAG is acrucial process that enhances language models' capabilities by integrating external knowledge. LLM Agentic Tool implements RAG through two main stages:
38
+
In the LLM Agentic Tool Mesh platform, RAG is a**crucial tool**that**can enhance****a language model's**capabilities by integrating external knowledge. LLM Agentic Tool implements RAG through two main stages:
39
39
40
-
***Injection**.
41
-
***Retrieval**.
40
+
***Injection**
41
+
***Retrieval**
42
42
43
43
Each stage is designed to standardize and optimize data use, ensuring generated content is both relevant and accurate.
44
44
45
45
## The injection process
46
46
47
-
The injection process involves preparing and integrating data into a storage system where it can be efficiently retrieved during the generation process.
47
+
The injection process involves preparing and integrating data into a storage system where it can be efficiently retrieved when content is being generated.
48
48
49
49
This process is abstracted into three key steps:
50
50
@@ -144,7 +144,7 @@ else:
144
144
145
145
### Loading
146
146
147
-
As part of the loading phase, the process includes injecting the transformed data into the chosen storage solution, such as a vector database, and further adapting the data as needed, such as by chunking it into smaller pieces for efficient retrieval.
147
+
As part of the loading phase, the process includes injecting the transformed data into the chosen storage solution, such as a vector database, and further adapting the data as needed, such as chunking it into smaller pieces for efficient retrieval.
148
148
149
149
Example usage
150
150
@@ -182,9 +182,9 @@ else:
182
182
183
183
Once the data has been injected and is ready for use, the retrieval process focuses on fetching the most relevant information based on a given input query. This ensures that the language model has access to the right data to generate accurate and contextually relevant outputs.
184
184
185
-
1.**Data retrieval**: Use various methods, such as dense or sparse retrieval, to fetch the most relevant data from storage.
186
-
2.**Metadata filtering**: Apply metadata filters to narrow down search results, ensuring the retrieved data matches the specific needs of the query.
187
-
3.**Chunk Expansion**: Expand the retrieved data chunks to provide comprehensive information for the language model.
185
+
1.**Data retrieval**: Uses various methods, such as dense or sparse retrieval, to fetch the most relevant data from storage
186
+
2.**Metadata filtering**: Applies metadata filters to narrow down search results, ensuring the retrieved data matches the specific needs of the query
187
+
3.**Chunk Expansion**: Expands the retrieved data chunks to provide comprehensive information for the language model
188
188
189
189

190
190
@@ -224,7 +224,7 @@ else:
224
224
225
225
# LLM Agentic Tool Mesh in action: Agentic tool using RAG
226
226
227
-
In the [LLM Agentic Tool Mesh GitHub](https://github.com/HewlettPackard/llmesh), there is an example of a RAG-based tool that provides quick and accurate access to 5G specifications: the **telco expert**.
227
+
In the [LLM Agentic Tool Mesh GitHub](https://github.com/HewlettPackard/llmesh), there is an example of a RAG-based tool that provides quick and accurate access to 5G specifications: the **telco expert (inside folder `examples/tool_rag`)**.
228
228
229
229
This agentic tool leverages the RAG services in LLM Agentic Tool Mesh to read telco standards, build or use a vector store from them, and then uses a query engine to find and return relevant information based on user queries.
0 commit comments