Skip to content

Commit 8edc91d

Browse files
committed
update quickstart and introduce chatbots info for students
1 parent 9516667 commit 8edc91d

5 files changed

Lines changed: 86 additions & 25 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# AI Chatbots - More information
2+
3+
Chatbot agents are AI Assistants that students can chat with to ask for help or further explanations regarding the Question that they are working on. Each Agent has its own personality and approach to assisting the students.
4+
5+
The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model) which received information regarding:
6+
7+
- the details of the Question the student is on currently,
8+
- the answer and worked solutions for each Response Area of the Question,
9+
- the student's progress on all parts of the Question,
10+
- the students's current previewed part,
11+
- the guidance time and tips form the lecturer.
12+
13+
---
14+
15+
## Available Chatbots
16+
17+
Currently the students have access to the following AI Chatbots. Many others are in development.
18+
19+
1. Informational Chatbot
20+
21+
This chatbot aims to complete all the relevant tasks the student requests based on the current Question they are working on. The Chatbot is aware of the Question details, answer, worked solution and guidance from the lecturer.
22+
23+
Some technical details:
24+
<pre style="white-space: pre-wrap;">
25+
<code>LLM model: GPT 4o mini [from OpenAI]
26+
response time (on average): 10 seconds
27+
28+
Helping approach: encourages self-discovery of the answer, but will reveal the solution if requested
29+
</code>
30+
</pre>
31+
32+
## AI Chatbot Development
33+
34+
Are you interested in developing your own chatbot? Then please check out the [Quickstart guide](quickstart.md) to develop and deploy your own AI chat agent for Lambda Feedback.

docs/advanced/chatbot_agents/local.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ docker run --env-file .env -it --name my-lambda-container -p 8080:8080 llm_chat
4242
This will start the evaluation function and expose it on port `8080` and it will be open to be curl:
4343

4444
```bash
45-
curl --location 'http://localhost:8080/2015-03-31/functions/function/invocations' --header 'Content-Type: application/json' --data '{"message":"hi","params":{"conversation_id":"12345Test","conversation_history": [{"type":"user","content":"hi"}]}}'
45+
curl --location 'http://localhost:8080/2015-03-31/functions/function/invocations' \
46+
--header 'Content-Type: application/json' \
47+
--data '{"body":"{\"message\": \"hi\", \"params\": {\"conversation_id\": \"12345Test\", \"conversation_history\": [{\"type\": \"user\", \"content\": \"hi\"}]}}"}'
4648
```
4749

4850
### Call Docker Container From Postman
@@ -56,13 +58,7 @@ http://localhost:8080/2015-03-31/functions/function/invocations
5658
Body:
5759

5860
```JSON
59-
{
60-
"message":"hi",
61-
"params":{
62-
"conversation_id":"12345Test",
63-
"conversation_history": [{"type":"user","content":"hi"}]
64-
}
65-
}
61+
{"body":"{\"message\": \"hi\", \"params\": {\"conversation_id\": \"12345Test\", \"conversation_history\": [{\"type\": \"user\", \"content\": \"hi\"}]}}"}
6662
```
6763

6864
Body with optional Params:

docs/advanced/chatbot_agents/quickstart.md

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Developing Chat Agents: Getting Started
1+
# Developing Chat Functions: Getting Started
22

3-
## What is a Chat Agent?
3+
## What is a Chat Function?
44

5-
It's a function which calls Large Language Models (LLMs) to respond to the student's messages given contxtual data:
5+
It's a function which calls Large Language Models (LLMs) to respond to the student's messages given contextual data:
66

77
- question data
88
- user data such as past responses to the problem
9-
Chatbot Agents capture and automate the process of assisting students during their learning process when outside of classroom.
9+
10+
Chat functions host a chatbot agent. Chatbot Agents capture and automate the process of assisting students during their learning process when outside of classroom.
1011

1112
## Getting Setup for Development
1213

1314
1. Get the code on your local machine (Using github desktop or the `git` cli)
1415

15-
- For new functions: clone the main repo for [lambda-chat](https://github.com/lambda-feedback/lambda-chat) and create a new branch. Then go under `scr/agents` and copy the `base_agent` folder.
16-
16+
- For new functions: clone the template repo for [chat-function-boilerplate](https://github.com/lambda-feedback/chat-function-boilerplate). **Make sure the new repository is set to public (it needs access to organisation secrets)**.
1717
- For existing functions: please make your changes on a new separate branch
1818

19-
2. _If you are creating a new chatbot agent_, you'll need to set it's name as the folder name in `scr/agents` and its corresponding files.
20-
3. You are now ready to start making changes and implementing features by editing each of the three main function-logic files:
19+
2. _If you are creating a new chatbot agent_, can either edit the `scr/agents/base_agent` or copy it and rename it based on your agent's name.
20+
3. You are now ready to start making changes and implementing features by editing each of the main function-logic files:
2121

2222
1. **`scr/agents/{base_agent}/{base}_agent.py`**: This file contains the main LLM pipeline using [LangGraph](https://langchain-ai.github.io/langgraph/) and [LangChain](https://python.langchain.com/docs/introduction/).
2323

@@ -54,9 +54,11 @@ It's a function which calls Large Language Models (LLMs) to respond to the stude
5454

5555
2. **`scr/agents/{base_agent}/{base}_prompts.py`**: This is where you can write the system prompts that describe how your AI Assistant should behave and respond to the user.
5656

57-
3. Make sure to add your agent `invoke()` function to the `module.py` file.
57+
3. _If you edited the agent file name_, make sure to add your agent `invoke()` function to the `module.py` file.
58+
59+
4. Update the `config.json` file with the chatbot's name.
5860

59-
4. Please add a `README.md` file to describe the use and behaviour of your agent.
61+
5. Please add a `README.md` file to describe the use and behaviour of your agent.
6062

6163
4. Changes can be tested locally by running the pipeline tests using:
6264
```bash
@@ -65,6 +67,29 @@ It's a function which calls Large Language Models (LLMs) to respond to the stude
6567
[Running and Testing Agents Locally](local.md){ .md-button }
6668

6769

68-
5. Merge commits into any branch (except main) will trigger the `dev.yml` workflow, which will build the docker image, push it to a shared `dev` ECR repository to make the function available from the `dev` and `localhost` client app.
70+
5. Merge commits into dev branch will trigger the `dev.yml` workflow, which will build the docker image, push it to a shared `dev` ECR repository and deploy an AWS Lambda function for the `dev` client app to call. In order to make your new chatbot available on the `dev` environment of the Lambda Feedback platform, you will have to get in contact with the ADMINS on the platform.
71+
72+
6. You can now test the deployed chat function using your preferred request client (such as [Insomnia](https://insomnia.rest/) or [Postman](https://www.postman.com/) or simply `curl` from a terminal). `DEV` Functions are made available at:
73+
```url
74+
https://57glfwwf7d.execute-api.eu-west-2.amazonaws.com/default/chat/<function name as defined in config.json>
75+
```
6976

70-
6. In order to make your new chatbot available on the LambdaFeedback platform, you will have to get in contact with the ADMINS on the platform.
77+
!!! example "Example Request to chatFunctionBoilerplate-dev"
78+
curl --location 'https://57glfwwf7d.execute-api.eu-west-2.amazonaws.com/default/chat/chatFunctionBoilerplate-dev' \
79+
--header 'Content-Type: application/json' \
80+
--data '{
81+
"message": "hi",
82+
"params": {
83+
"conversation_id": "12345Test",
84+
"conversation_history": [
85+
{
86+
"type": "user",
87+
"content": "hi"
88+
}
89+
]
90+
}
91+
}'
92+
93+
6. Once the `dev` chatbot is fully tested, you can merge the code to the default branch (`main`). This will trigger the `main.yml` workflow, which will deploy the `staging` and `prod` versions of your chatbot. Please contact the ADMIN to provide the URLS for the `staging` and `prod` versions of your agent.
94+
95+
6. In order to make your new chatbot available on any of the environments of the Lambda Feedback platform, you will have to get in contact with the ADMINS on the platform.

docs/student/getting_started_student.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,20 @@ See the [Answering Questions](answering_questions.md) page for more help with an
3535

3636
### Using the Workspace
3737

38-
The Workspace provides you with various functionalities to assist you during your learning process:
39-
1. #### Canvas:
38+
The Workspace provides you with various functionalities to assist you during your learning process. Your edits and progress in the Workspace are saved per each Question you preview. So, you will be able to view your old edits for the Question you are currently on.
39+
40+
Here are the various functionalities:
41+
42+
#### Canvas:
4043
A pane where you can write down your thought process and notes for the previewed question (handwriting, sticky notes & text).
4144

4245
![Canvas Interface](images/canvas_interface.png)
4346

44-
2. #### Chat:
45-
A chat interface connecting you with helpful AI Chatbots to discuss any questions you have on the current topic you are working on.
47+
#### Chat:
48+
A chat interface connecting you with helpful Chatbots. Chatbot agents are AI Assistants that you can chat with to ask for help or further explanations regarding the Question that you are working on.
4649

4750
![Chat Interface](images/chat_interface.png)
4851

49-
Your edits and progress in the Workspace are saved per each Question you preview. So, you will be able to view your old edits for the Question you are currently on.
52+
For more information on what the chatbot knows about you and how you can use it to its full potential:
53+
54+
[Chatbot Agents - More Info](../advanced/chatbot_agents/info.md){ .md-button .md-button--primary}

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ nav:
7474
- Chat agents:
7575
- Quickstart: "advanced/chatbot_agents/quickstart.md"
7676
- Testing Functions Locally: "advanced/chatbot_agents/local.md"
77+
- Chat Agents Information: "advanced/chatbot_agents/info.md"
7778

7879
# Configuration
7980
theme:

0 commit comments

Comments
 (0)