Thuta Learning
LangChain
AdvancedAIအဆင့်မြင့်

Retrieval Chain

LangChainသင်ခန်းစာ 12

RAG တွင်, user query နှင့် အကိုက်ညီဆုံးဖြစ်သော documents များကို vector store မှ Retriever ဖြင့် ရှာဖွေသည်။ ထို့နောက် ထို documents များနှင့် မူရင်း query ကို LLM သို့ပို့ပြီး အဖြေကို generate လုပ်စေသည်။

python
# Create a retriever from the vector store
retriever = vectorstore.as_retriever()

# Create a chain that combines the retrieved documents and the question
# and sends it to the LLM.
# (This requires a more complex chain setup)

response = qa_chain.invoke({"query": "What is the main topic of the document?"})
You should see
(LLM သည် သင်ပေးထားသော document ထဲမှ information ကို အခြေခံ၍ အဖြေကို ပြန်ပေးမည်)

နောက်ဆုံးပြင်ဆင်ရက်

Progress ကို ဤ browser (ဤစက်) တွင်သာ သိမ်းထားပါသည်။ အခြားစက်များနှင့် sync မလုပ်ပါ။

ဤသင်ခန်းစာတွင် အမှားတွေ့ပါက အကြောင်းကြားရန်သင့် email app ကို ဤသင်ခန်းစာလိပ်စာ ဖြည့်ပြီးသားဖြင့် ဖွင့်ပေးပါမည် — သင်ကိုယ်တိုင် ပို့မှသာ ပို့မည်ဖြစ်သည်။

Retrieval Chain | Thuta Learning