Dynamic Few-shot Prompting with Llama 3 on local Environment | Ollama | Langchain | SQL Agent

  Рет қаралды 2,100

TheAILearner

TheAILearner

Күн бұрын

This video teaches you how to implement dynamic few-shot prompting with open-source LLMs like Llama 3 using Langchain on local environment.
In this tutorial, we will follow these steps:
1. Import Llama3 : Begin by importing the necessary Llama3 library using Ollama.
2. Fetch SQL Data : Connect to your SQL database and fetch the data you need. This involves establishing a connection to sqlite database.
3. Initialize Few-Shot Examples : Select a few-shot learning approach by initializing a set of examples that will guide the model.
4. Convert Examples to Embeddings : Transform the few-shot examples into embeddings.
5. Create Custom Tools : Develop custom tools tailored to your specific needs (Here relate to SQL database).
6. Create Prompt: Design a prompt that will be used to interact with the model.
7. Create an Agent with ReAct Logic : Develop an agent that incorporates ReAct (Reasoning and Acting) logic. This agent will use the prompt and the few-shot examples to perform tasks interactively.
8. Agent Executor : Implement the agent executor, which will manage the execution of tasks by the agent. This component should handle the flow of information between the agent and other parts of your system, ensuring smooth and efficient operation.
Code Link : github.com/The...
Ollama Github - github.com/oll...
SQL Agent with Llama 3(With Ollama Installation in Local) - • Build an SQL Agent wit...
#dynamicfewshotprompting #sqlagent #llama3 #langchain #ollama #customtools #customagent #fewshotprompting #sql #database #langchain #machinelearning #nlp

Пікірлер: 10
@umeshtiwari9249
@umeshtiwari9249 3 ай бұрын
Thanks for such nice tutorial on complex topic
@GordonShamway1984
@GordonShamway1984 3 ай бұрын
very nicely explained. You helped me a lot, thank you!
@NillsBoher
@NillsBoher 3 ай бұрын
Great!!!! Thanks for sharing your knowledge! However I want to ask it the prompt is not too long for the context of ollama3?
@theailearner1857
@theailearner1857 3 ай бұрын
Not at all. Llama 3 has context length of 8192 while the prompt shown in the video varies from 450 to 500 tokens only.
@MScProject-u9n
@MScProject-u9n 3 ай бұрын
How can I run it in colab instead of local Environment?
@MScProject-u9n
@MScProject-u9n 3 ай бұрын
Can you also provide us the source code
@theailearner1857
@theailearner1857 3 ай бұрын
You can check out this video to run Ollama-based models on Google Colab, after which the dynamic few-shot prompting steps can be easily implemented. kzbin.info/www/bejne/jnXZhaeVibSYrbcsi=RkjXX-jO3VSA08Em
@theailearner1857
@theailearner1857 3 ай бұрын
Code Link : github.com/TheAILearner/Langchain-Agents/blob/main/Dynamic%20Few-shot%20Prompting%20with%20Llama%203.ipynb
@MeTuMaTHiCa
@MeTuMaTHiCa 3 ай бұрын
İt will be good when this works with cloud
@MeTuMaTHiCa
@MeTuMaTHiCa 3 ай бұрын
By the way thx for good ai work
Reliable, fully local RAG agents with LLaMA3.2-3b
31:04
LangChain
Рет қаралды 40 М.
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 9 МЛН
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 7 МЛН
AI meets Accounting - Welcome to the Game! - Accounting Summit 2024
28:36
EASIEST Way to Fine-Tune a LLM and Use It With Ollama
5:18
warpdotdev
Рет қаралды 70 М.
A Natural Language AI (LLM) SQL Database - Could this work?
8:52
All About AI
Рет қаралды 12 М.
LLM-Powered Text-to-SQL with Amazon Bedrock Agent Explained
18:30
Denys on Data
Рет қаралды 1,9 М.
Run Llama 3.1 locally using LangChain
10:19
Code With Aarohi
Рет қаралды 8 М.
Zero, One, and Few Shot Prompting with Langchain and OpenAI LLMs
20:24
Ryan & Matt Data Science
Рет қаралды 4,8 М.
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
pixegami
Рет қаралды 262 М.
Build an SQL Agent with Llama 3 | Langchain | Ollama
20:28
TheAILearner
Рет қаралды 10 М.
Few Shot Prompting with Llama2 and Ollama
6:08
Learn Data with Mark
Рет қаралды 4,9 М.
Importing Open Source Models to Ollama
7:14
Decoder
Рет қаралды 33 М.