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/posts/machine learning/deep learning/NLP/Gemma2+RAG/gemma-2-rag-llamaindex-faiss.md
+12-58Lines changed: 12 additions & 58 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
+
2
+
1
3
# Gemma-2 + RAG + LlamaIndex + VectorDB
2
-
Load Gemma-2 9B (IT - fine-tuned on instructions)
3
4
4
5
5
6
6
-
# Introduction
7
+
##Introduction
7
8
Retrieval-Augmented Generation (RAG) is an advanced AI technique that enhances large language models (LLMs) with the ability to access and utilize external knowledge. This guide will walk you through a practical implementation of RAG using Python and various libraries, explaining each component in detail.
@@ -252,7 +253,7 @@ for i, resp in enumerate(llm_responses):
252
253
```
253
254
254
255
255
-
## Which scientists contributed the most to superconductivity?
256
+
###Which scientists contributed the most to superconductivity?
256
257
257
258
258
259
It's impossible to name just a few scientists who "contributed the most" to superconductivity, as it's a field built on the work of many brilliant minds over decades.
@@ -281,10 +282,10 @@ It's important to remember that scientific progress is a collaborative effort, b
281
282
282
283
283
284
284
-
## Which are the differences between Type-I and Type-II superconductors? Describe magnetical properties and show formulas.
285
+
###Which are the differences between Type-I and Type-II superconductors? Describe magnetical properties and show formulas.
285
286
286
287
287
-
## Type-I vs. Type-II Superconductors
288
+
####Type-I vs. Type-II Superconductors
288
289
289
290
Superconductors are materials that exhibit zero electrical resistance below a critical temperature (Tc). They are classified into two main types: Type-I and Type-II, based on their response to magnetic fields.
290
291
@@ -333,7 +334,7 @@ Superconductors are materials that exhibit zero electrical resistance below a cr
333
334
334
335
335
336
336
-
## What are the London Equation? Why are they important?
337
+
###What are the London Equation? Why are they important?
337
338
338
339
339
340
The London equations are a set of equations that describe the behavior of superconductors. They were first derived by Fritz and Heinz London in 1935.
@@ -374,7 +375,7 @@ Despite their limitations, the London equations are a cornerstone of superconduc
374
375
375
376
376
377
377
-
## Solve this problem: Consider a bulk superconductor containing a cylindrical hole of 0.1 mm diameter. There are 7 magnetic flux quanta trapped in the hole. Find the magnetic field in the hole.
378
+
###Solve this problem: Consider a bulk superconductor containing a cylindrical hole of 0.1 mm diameter. There are 7 magnetic flux quanta trapped in the hole. Find the magnetic field in the hole.
@@ -626,7 +588,7 @@ The provided text highlights the historical development of superconductivity the
626
588
627
589
628
590
629
-
## Solve this problem: Consider a bulk superconductor containing a cylindrical hole of 0.1 mm diameter. There are 7 magnetic flux quanta trapped in the hole. Find the magnetic field in the hole.
591
+
###Solve this problem: Consider a bulk superconductor containing a cylindrical hole of 0.1 mm diameter. There are 7 magnetic flux quanta trapped in the hole. Find the magnetic field in the hole.
@@ -675,11 +637,3 @@ This implementation demonstrates the power of RAG in combining the strengths of
675
637
The comparison between direct LLM responses and RAG responses would likely show the benefits of RAG in providing more detailed, accurate, and source-backed information. This approach is particularly valuable in domains requiring up-to-date or specialized knowledge, where the LLM's pre-trained knowledge might be insufficient or outdated.
0 commit comments