Daniel Leeโ€™s Post

View profile for Daniel Lee, graphic

Data/AI Jobs with Datainterview.com ๐Ÿš€ | AI Consultant | Ex-Google

๐Ÿ‘‰ Curious about how to build an ๐—”๐—œ ๐—–๐—ต๐—ฎ๐˜๐—ฏ๐—ผ๐˜? Here's how I am creating one for a client for my AI consulting business๐Ÿ‘‡ ๐Ÿ“š ๐—™๐—ถ๐—ฟ๐˜€๐˜, ๐˜๐—ต๐—ฒ ๐—ง๐—ฒ๐—ฐ๐—ต ๐—ฆ๐˜๐—ฎ๐—ฐ๐—ธ ๐Ÿ”น Streamlit - I use this to display the chat interface itself ๐Ÿ”น OpenAI - Grab an API key for GPT3.5+ for prompt processing/generation ๐Ÿ”น LangChain - Open-source for building chatbot application ๐Ÿ”น Pinecone - Vector DB to store customer's document data ๐Ÿ”น FastAPI - Use this as the API framework ๐Ÿ—บ๏ธ ๐—ฆ๐—ฒ๐—ฐ๐—ผ๐—ป๐—ฑ, ๐˜‚๐—ป๐—ฑ๐—ฒ๐—ฟ๐˜€๐˜๐—ฎ๐—ป๐—ฑ ๐˜๐—ต๐—ฒ ๐—ณ๐—น๐—ผ๐˜„ 1. The user sends a request prompt request via Streamlit chat interface 2. FastAPI receives the endpoint that invokes the LLM agent 3. The LLM agent doesn't generate the prompt right away, it selects Tools 4. Tools include (A) querying Snowflakes or (B) retrieving docs from Pinecone 4A. If Agent uses SQL, it creates an SQL script executable in Snowflakes 4B. If Agent needs contexts, use retriever to get docs from Pinecone 5. Agent responses with user question + chat history (memory) + context ๐Ÿ’ก ๐—–๐—ผ๐—ป๐˜€๐—ถ๐—ฑ๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ Prototyping is the easy part, but implementation at the enterprise level is the most challenging part of the work. โœ… Security is the biggest issue for chatbots. User can use prompt injection to shutdown an SQL DB or service if the agent has permission to do so. โœ… Managing multiple data from multiple clients. Not all users should have access to all the data in the vector store. You have to create a new index per client or use a namespace per client to separate client data. โœ… Prompt evaluation in scale. You can't use generic LLM data like MMLU for evaluating chatbot as the task involved is specialized. Work with an SME and train a separate LLM that evaluates responses. Or gather user-based signals to gauge the level of engagement with a chatbot. ๐Ÿ‘‰ LLM is a game-changer. And, I will show you how to leverage one for your company's use case. Make sure you follow me Daniel Lee and smash the ๐Ÿ‘ ๐Ÿ‘‰ Join AI School to learn AI and sign up for the newsletter at https://lnkd.in/dRUqb5cJ ๐Ÿ‘‰ Land Data/AI jobs with datainterview.com. I am teaching ๐——๐—ฆ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐—•๐—ผ๐—ผ๐˜๐—ฐ๐—ฎ๐—บ๐—ฝ ๐Ÿš€ in 4 weeks! Join me: https://lnkd.in/eiA5Ntdp

  • No alternative text description for this image
Umar Abdullah

AI Engineer @ Centific

2mo

Insightful!

Cyrus Khajvandi

CEO & Co-Founder at Humata.ai

2mo

This is wonderful, Daniel. Humata is a no-code way to create an AI chatbot grounded on your own data. See more here: https://www.linkedin.com/feed/update/urn:li:activity:7193942801183584256/

Kurnia Kwik

Digital Advertising and SEO Specialist, and AI Assistant Builder

2mo

There are several AI chatbot builders that do not require Langchain or Pinecone. It has very few lines of prompting and is simple to do. What are your thoughts on Orimon, New Oaks, Retune, and Chatbase?

Vincent Granville

Chief AI Scientist, GenAItechLab.com

2mo

See also performance comparison to build LLM/RAG apps with vector databases, at https://mltblog.com/3weQ2UP

  • No alternative text description for this image

I like how you broke it down, Daniel Lee. I have worked with similar architecture. My biggest pain point: - Agent routing issues when accessing tools. How does your agent handle routing issues?

Like
Reply
Rajani Choudhary

โ˜… Senior QA Lead

2mo

Very informative

Like
Reply
Antara Raman Sahay

SWE @ Helmerich & Payne | LLM | Gen AI

2mo

Loved the way you articulated all the points ๐Ÿ™Œ

Shreya Khandelwal

Data Scientist @IBM | Top 1% Data Science Mentor | AI & Analytics | Multi-Cloud Certified | 4.9K+ Network @LinkedIn | Top Data Analytics Voice ๐Ÿ†

2mo

Fantastic breakdown! Your approach to building an AI Chatbot is incredibly thorough and well-considered. Thanks for sharing your expertise! ๐Ÿ™Œ

Goutam Gupta

Principal Architect | Data Analysis, AI Engineering, Cloud-Native Integration | IIT KGP

2mo

Very informative

Steven Lowe

Founder | Data Analytics Leader| BI Enthusiast | Tableau Certified

2mo

Thanks. Fascinating stuff.

See more comments

To view or add a comment, sign in

Explore topics