Skip to content

Commit

Permalink
Update readme (#1494)
Browse files Browse the repository at this point in the history
Update readme

Created a colab notebook to help showcase the demo without setting up
streamlit

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1494).
* __->__ #1494
* #1493
* #1492
  • Loading branch information
saqadri committed May 21, 2024
2 parents d6704d2 + b833f3c commit 830cbb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 11 additions & 0 deletions cookbooks/Basic-Prompt-Routing/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Basic Prompting Routing - AI Teaching Assistant

[![colab](https://colab.research.google.com/drive/1ue0ZAEdlalw57JwTtXlfl8kH8W_j1XQq#scrollTo=kNmnUZnUFzt3)]

This demo shows prompt routing with AIConfig. We used streamlit to host the app so you can interact with the assistant!
Alternatively, you can run the aiconfig in an ipynb

![image](https://github-production-user-asset-6210df.s3.amazonaws.com/81494782/282203473-f779feb6-339d-4331-9aed-1761b845100a.png)

## Streamlit

### How does it work?

The user asks a question. The LLM decides the topic as math, physics, or general. Based on the topic, the LLM selects a different "assistant" to respond. These assistants have different system prompts and respond with varying introductions and style of response.
Expand All @@ -17,3 +22,9 @@ The user asks a question. The LLM decides the topic as math, physics, or general
### Run with Streamlit

`streamlit run assistant_app.py`

## IPython Notebook

[![colab](https://colab.research.google.com/drive/1ue0ZAEdlalw57JwTtXlfl8kH8W_j1XQq#scrollTo=kNmnUZnUFzt3)]

Open assistant.ipynb in this folder, or in Colab, to use the aiconfig
1 change: 0 additions & 1 deletion cookbooks/Basic-Prompt-Routing/assistant.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"source": [
"## Load AI Config `assistant.aiconfig.json`\n",
"\n",
"/Users/saqadri/lm/aiconfig2/cookbooks/Basic-Prompt-Routing/assistant.ipynb\n",
"Download file [from here](https://github.com/lastmile-ai/aiconfig/blob/main/cookbooks/Basic-Prompt-Routing/assistant.aiconfig.json). \n",
"\n",
"If you're using Colab, Upload to 'Files' in your colab notebook and load (shown below).\n"
Expand Down

0 comments on commit 830cbb7

Please sign in to comment.