Basically you are condensing all the functionality in this repo into agents that work in 1 streamlit app, and the main orchestration agent can decide which agent to do the job and find the right info.
https://github.com/langchain-ai/streamlit-agent/tree/main?tab=readme-ov-file

I have a streamlit app that is able to pick between 2 Snowflake tables, which table it should query.  However, instead of using just the streamlit app, i want to use Langchain.  All of the code necessary, including synthetic data, is within all these repos.  I need it stored in a github repo that I can pull or I can make you a repo called
https://github.com/elsaVelazquez/streamlit_langchain

I need it to read snowflake tables using SQL, pdf’s, csv’s, text files, upload files and images, etc.

Essentially, you are simply combining the repos and optimizing for lowest cost possible, and including authentication for login.  Many different users will be using this, it will mostly run this website https://yamsco.com , but am also using it for other things, therefore the synthetic data.

Define Access Levels:
Will use Snowflake roles to manage permissions.
Limiting Streamlit app access using user authentication with login credentials, will share these over zoom (I recently got hacked, so am uber cautious).

Snowflake Data Setup:
Snowflake already has some time series data and other necessary data points.
***This is already accomplished with synthetic data in this repo.
Use this synthetic data, it already exists in snowflake https://github.com/elsaVelazquez/streamlit
https://github.com/elsaVelazquez/streamlit/blob/main/src/create_synthetic_data.sql

Streamlit App Development:
this snowflake app generates the kinds of questions the main agent should ask, but it only uses streamlit.
https://github.com/elsaVelazquez/streamlit/blob/main/src/frosty_app.py
You should be able to ask it things such as
"Which was the top keyword"
"What was the net gross sales"

However, it needs to use langchain as agents,  we want it to be able to pick which data source to use to answer from
The code here https://github.com/elsaVelazquez/streamlit/blob/main/src/prompts.py
is already able to pick between 2 tables and the text file.

This code shows an example using langchain:
And we also want it to be able to use RAG, read CSV’s, live data from a dynamic website, and any other type of file should be its own agent.

This example shows a RAAG agent with streamlit and langchain:
https://github.com/langchain-ai/text-split-explorer

Set up a Streamlit app with user authentication for login.
Create UI components for data display, such as charts for time series data.
Develop functionality for users to upload PDFs (like resumes) to their profile.
Integrating Streamlit with Snowflake:

Use Snowflake’s Python connector to fetch and write data from and to Snowflake within the Streamlit app.
Implement caching in Streamlit to minimize compute and API calls to Snowflake.
Compute Management:

For Snowflake, choose a virtual warehouse size that balances performance and cost, and set resource monitors to control spend.
In Streamlit, manage app performance by optimizing data operations and considering using Streamlit sharing for deployment if eligible.
Testing and Deployment:

Thoroughly test the Streamlit app, ensuring that data interactions with Snowflake are secure and performant.
Deploy the Streamlit app, possibly using Streamlit sharing for easy deployment and scalability.
Monitoring and Scaling:

Set up monitoring for both Snowflake usage and Streamlit app performance.
Plan for scalability based on user load and data volume.

Posted On: January 29, 2024 05:04 UTC
Category: AI Chatbot Development
Skills:AI Chatbot, Customer Service Chatbot, Online Chat Support, Python, Lead Generation, Order Tracking, Customer Satisfaction, Product Knowledge, Phone Support, Technical Support

Country: United States

click to apply

Powered by WPeMatico