Shubham Saboo Profile picture
May 21, 2024 10 tweets 3 min read Read on X
Build an AI Search Assistant with GPT-4o in just 15 lines of Python Code (step-by-step instructions):
1. Install the necessary Python Libraries

Run the following command from your terminal. Image
2. Import necessary libraries

• Streamlit for building the web app
• Phidata for building AI agents
• OpenAI for using the LLM
• Duckduckgo for the search functionality Image
3. Set up the Streamlit App

Streamlit lets you create user interface with just python code, for this app we will:
• Add a title to the app using 'st.title()'
• Add a description for the app using 'st.caption()' Image
4. Create and Initialize the AI assistant

• Create a text input to enter their OpenAI API key using 'st.text_input()'
• If the OpenAI API key is provided, create an instance of Assistant with gpt-4 as LLM and DuckDuckGo as the tool. Image
5. Search the Web with your Generative AI assistant

• Create a text input for the user to enter their query using 'st.text_input()'
• If a question is asked, run the assistant to get the answer and display it using 'st.write()' Image
Full Application code for Generative AI Search Assistant👇 Image
Working Application demo using Streamlit

Paste the above code in vscode or pycharm and run the following command: 'streamlit run ai_webagent.py'
Find all the awesome LLM Apps demo with RAG and AI agents in the following Github Repo.

P.S: Don't forget to star the repo to show your support 🌟
github.com/Shubhamsaboo/a…
If you find this useful, RT to share it with your friends.

Don't forget to follow me @Saboo_Shubham_ for more such LLMs tips and tutorials.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Shubham Saboo

Shubham Saboo Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Saboo_Shubham_

Sep 14
China's Alibaba just dropped a Python framework for building multi-agent apps.

AgentScope lets you build AI agents visually with MCP tools, memory, rag, and reasoning capabilities.

Works with any LLM and supports real-time steering.

100% Opensource. Image
100+ free step-by-step tutorials with code covering:

🚀 AI Agents
📀 RAG Systems
🗣️ Voice AI Agents
🌐 MCP AI Agents
🤝 Multi-agent Teams
🎮 Autonomous Game Playing Agents

P.S: Don't forget to subscribe for FREE to access future tutorials.

theunwindai.com
Read 4 tweets
Sep 12
JSON prompting for LLMs, explained with examples:
What is JSON prompting?

JSON prompting is a way of asking an LLM using a clear, structured format (with keys and values) and expecting the response in the same structured style.

Text prompts → inconsistent, messy outputs
JSON prompt → consistent, parseable data Image
The Problem With Text Prompts

Natural language is strong, but in AI it’s loose.

“Summarize this email” or “give key takeaways” leaves room for guesswork.

You wouldn’t tell a junior: “Make it better. Do what feels right.”

Yet we do that with AI all the time. Image
Read 12 tweets
Sep 7
Let's build a local RAG Agent using Google's EmbeddingGemma and Ollama running locally on your machine.

100% Opensource and works without internet.
You can follow along this tutorials with step-by-step code instructions on @unwind_ai_

theunwindai.com/p/build-a-loca…
1. Install the necessary Python Libraries

Run the following command from your terminal.

Then pull the required Ollama models:
• ollama pull embeddinggemma:latest
• ollama pull llama3.2:latest Image
Read 11 tweets
Sep 4
Stop building AI agents that ignore your instructions.

This Python framework guarantees LLM Agents follow your rules in production. Every single time.

100% Opensource. Image
Traditional approach: Write 47-rule system prompts and pray the LLM follows them.

Parlant (@EmcieCo) approach: Define clear guidelines that are contextually matched and enforced.

No more "roll of the dice" conversations. Image
Parlant Version 3 just dropped:

• Guidelines: Rules you set are enforced every single time
• Journeys: Conversations adapt when users go off-script
• Playground: Watch, test, and debug in full context
• Widget: Production-ready chat UI you can drop anywhere
Read 4 tweets
Aug 30
RAG everything locally!

Index millions of documents on your laptop using 97% less storage than traditional vector databases.

Also work as a drop-in semantic search search MCP for claude Code.

100% Opensource and free with Ollama. Image
100+ free step-by-step tutorials with code covering:

🚀 AI Agents
📀 RAG Systems
🗣️ Voice AI Agents
🌐 MCP AI Agents
🤝 Multi-agent Teams
🎮 Autonomous Game Playing Agents

P.S: Don't forget to subscribe for FREE to access future tutorials.

theunwindai.com
Stay tuned for more such interesting posts → @Saboo_Shubham_

I have created 100+ AI Agents and RAG tutorials, 100% free and opensource.

P.S: Don't forget to star the repo to show your support 🌟

github.com/Shubhamsaboo/a…
Read 4 tweets
Aug 25
Learn to build AI Coding Agents from scratch.

Similar to Claude code, Cursor, Windsurf, Amp, Cline and OpenCode.

100% free workshop. Image
100+ free AI Agents and RAG tutorials with code covering:

🚀 AI Agents
📀 RAG Systems
🗣️ Voice AI Agents
🌐 MCP AI Agents
🤝 Multi-agent Teams
🎮 Autonomous Game Playing Agents

P.S: Don't forget to subscribe for FREE to access future tutorials.

theunwindai.com
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(