From 8edc91d5fed6e0824f54ded16c9c722bfac6bd48 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Wed, 29 Jan 2025 13:25:39 +0000 Subject: [PATCH 01/14] update quickstart and introduce chatbots info for students --- docs/advanced/chatbot_agents/info.md | 34 +++++++++++++++ docs/advanced/chatbot_agents/local.md | 12 ++---- docs/advanced/chatbot_agents/quickstart.md | 49 ++++++++++++++++------ docs/student/getting_started_student.md | 15 ++++--- mkdocs.yml | 1 + 5 files changed, 86 insertions(+), 25 deletions(-) create mode 100644 docs/advanced/chatbot_agents/info.md diff --git a/docs/advanced/chatbot_agents/info.md b/docs/advanced/chatbot_agents/info.md new file mode 100644 index 000000000..a017e1c6f --- /dev/null +++ b/docs/advanced/chatbot_agents/info.md @@ -0,0 +1,34 @@ +# AI Chatbots - More information + +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. + +The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model) which received information regarding: + +- the details of the Question the student is on currently, +- the answer and worked solutions for each Response Area of the Question, +- the student's progress on all parts of the Question, +- the students's current previewed part, +- the guidance time and tips form the lecturer. + +--- + +## Available Chatbots + +Currently the students have access to the following AI Chatbots. Many others are in development. + +1. Informational Chatbot + +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. + +Some technical details: +
+LLM model: GPT 4o mini [from OpenAI]
+response time (on average): 10 seconds
+
+Helping approach: encourages self-discovery of the answer, but will reveal the solution if requested
+
+
+ +## AI Chatbot Development + +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. \ No newline at end of file diff --git a/docs/advanced/chatbot_agents/local.md b/docs/advanced/chatbot_agents/local.md index 3f122e5a4..d3355601b 100644 --- a/docs/advanced/chatbot_agents/local.md +++ b/docs/advanced/chatbot_agents/local.md @@ -42,7 +42,9 @@ docker run --env-file .env -it --name my-lambda-container -p 8080:8080 llm_chat This will start the evaluation function and expose it on port `8080` and it will be open to be curl: ```bash -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"}]}}' +curl --location 'http://localhost:8080/2015-03-31/functions/function/invocations' \ +--header 'Content-Type: application/json' \ +--data '{"body":"{\"message\": \"hi\", \"params\": {\"conversation_id\": \"12345Test\", \"conversation_history\": [{\"type\": \"user\", \"content\": \"hi\"}]}}"}' ``` ### Call Docker Container From Postman @@ -56,13 +58,7 @@ http://localhost:8080/2015-03-31/functions/function/invocations Body: ```JSON -{ - "message":"hi", - "params":{ - "conversation_id":"12345Test", - "conversation_history": [{"type":"user","content":"hi"}] - } -} +{"body":"{\"message\": \"hi\", \"params\": {\"conversation_id\": \"12345Test\", \"conversation_history\": [{\"type\": \"user\", \"content\": \"hi\"}]}}"} ``` Body with optional Params: diff --git a/docs/advanced/chatbot_agents/quickstart.md b/docs/advanced/chatbot_agents/quickstart.md index 72b2c78d0..8cfb5ea5c 100644 --- a/docs/advanced/chatbot_agents/quickstart.md +++ b/docs/advanced/chatbot_agents/quickstart.md @@ -1,23 +1,23 @@ -# Developing Chat Agents: Getting Started +# Developing Chat Functions: Getting Started -## What is a Chat Agent? +## What is a Chat Function? -It's a function which calls Large Language Models (LLMs) to respond to the student's messages given contxtual data: +It's a function which calls Large Language Models (LLMs) to respond to the student's messages given contextual data: - question data - user data such as past responses to the problem - Chatbot Agents capture and automate the process of assisting students during their learning process when outside of classroom. + +Chat functions host a chatbot agent. Chatbot Agents capture and automate the process of assisting students during their learning process when outside of classroom. ## Getting Setup for Development 1. Get the code on your local machine (Using github desktop or the `git` cli) - - 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. - + - 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)**. - For existing functions: please make your changes on a new separate branch -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. -3. You are now ready to start making changes and implementing features by editing each of the three main function-logic files: +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. +3. You are now ready to start making changes and implementing features by editing each of the main function-logic files: 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/). @@ -54,9 +54,11 @@ It's a function which calls Large Language Models (LLMs) to respond to the stude 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. - 3. Make sure to add your agent `invoke()` function to the `module.py` file. + 3. _If you edited the agent file name_, make sure to add your agent `invoke()` function to the `module.py` file. + + 4. Update the `config.json` file with the chatbot's name. - 4. Please add a `README.md` file to describe the use and behaviour of your agent. + 5. Please add a `README.md` file to describe the use and behaviour of your agent. 4. Changes can be tested locally by running the pipeline tests using: ```bash @@ -65,6 +67,29 @@ It's a function which calls Large Language Models (LLMs) to respond to the stude [Running and Testing Agents Locally](local.md){ .md-button } -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. +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. + +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: + ```url + https://57glfwwf7d.execute-api.eu-west-2.amazonaws.com/default/chat/ + ``` -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. + !!! example "Example Request to chatFunctionBoilerplate-dev" + curl --location 'https://57glfwwf7d.execute-api.eu-west-2.amazonaws.com/default/chat/chatFunctionBoilerplate-dev' \ + --header 'Content-Type: application/json' \ + --data '{ + "message": "hi", + "params": { + "conversation_id": "12345Test", + "conversation_history": [ + { + "type": "user", + "content": "hi" + } + ] + } + }' + +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. + +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. diff --git a/docs/student/getting_started_student.md b/docs/student/getting_started_student.md index eb5e0cc96..b8ef925e8 100644 --- a/docs/student/getting_started_student.md +++ b/docs/student/getting_started_student.md @@ -35,15 +35,20 @@ See the [Answering Questions](answering_questions.md) page for more help with an ### Using the Workspace -The Workspace provides you with various functionalities to assist you during your learning process: -1. #### Canvas: +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. + +Here are the various functionalities: + +#### Canvas: A pane where you can write down your thought process and notes for the previewed question (handwriting, sticky notes & text). ![Canvas Interface](images/canvas_interface.png) -2. #### Chat: -A chat interface connecting you with helpful AI Chatbots to discuss any questions you have on the current topic you are working on. +#### Chat: +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. ![Chat Interface](images/chat_interface.png) -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. +For more information on what the chatbot knows about you and how you can use it to its full potential: + +[Chatbot Agents - More Info](../advanced/chatbot_agents/info.md){ .md-button .md-button--primary} diff --git a/mkdocs.yml b/mkdocs.yml index 17e895b3e..02fe3f321 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -74,6 +74,7 @@ nav: - Chat agents: - Quickstart: "advanced/chatbot_agents/quickstart.md" - Testing Functions Locally: "advanced/chatbot_agents/local.md" + - Chat Agents Information: "advanced/chatbot_agents/info.md" # Configuration theme: From 1c80dc2bfa3c29e990a347c6e6bc95461e65589e Mon Sep 17 00:00:00 2001 From: Alexandra Neagu <33195033+neagualexa@users.noreply.github.com> Date: Mon, 7 Jul 2025 12:55:49 +0100 Subject: [PATCH 02/14] Update LLM model --- docs/advanced/chatbot_agents/info.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/chatbot_agents/info.md b/docs/advanced/chatbot_agents/info.md index a017e1c6f..d6c708f91 100644 --- a/docs/advanced/chatbot_agents/info.md +++ b/docs/advanced/chatbot_agents/info.md @@ -22,7 +22,7 @@ This chatbot aims to complete all the relevant tasks the student requests based Some technical details:
-LLM model: GPT 4o mini [from OpenAI]
+LLM model: Gemini-2.0-flash (Google)
 response time (on average): 10 seconds
 
 Helping approach: encourages self-discovery of the answer, but will reveal the solution if requested
@@ -31,4 +31,4 @@ Helping approach: encourages self-discovery of the answer, but will reveal the s
 
 ## AI Chatbot Development
 
-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.
\ No newline at end of file
+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.

From 65a032d685cfba20403a41c7a5c464f0cb1ca497 Mon Sep 17 00:00:00 2001
From: neagualexa 
Date: Fri, 3 Oct 2025 09:47:52 +0100
Subject: [PATCH 03/14] chatbot docs links

---
 docs/advanced/chat_functions/info.md | 36 ++++------------------------
 1 file changed, 4 insertions(+), 32 deletions(-)

diff --git a/docs/advanced/chat_functions/info.md b/docs/advanced/chat_functions/info.md
index 31b0c24a1..df3bcaa10 100644
--- a/docs/advanced/chat_functions/info.md
+++ b/docs/advanced/chat_functions/info.md
@@ -16,44 +16,16 @@ The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikip
 
 Currently the students have access to the following AI Chatbots. Many others are in development.
 
-#### 1. Informational Chatbot
+Click on the links below for information on each chatbot:
 
-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.
+[1. Informational Chatbot](https://github.com/lambda-feedback/informationalChatFunction/blob/main/docs/user.md)
 
-Some technical details:
-
-LLM model: Gemini-2.0-flash (Google)
-response time (on average): 10 seconds
 
-Helping approach: encourages self-discovery of the answer, but will reveal the solution if requested
-
-
+[2. Concise Chatbot](https://github.com/lambda-feedback/conciseChatFunction/blob/main/docs/user.md) -#### 2. Concise Chatbot -This chatbot aims to concisely respond to all 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. +[3. Reflective Chatbot](https://github.com/lambda-feedback/reflectiveChatFunction/blob/main/docs/user.md) -Some technical details: -
-LLM model: Gemini-2.0-flash (Google)
-response time (on average): 10 seconds
-
-Helping approach: provides short, direct answers without extra detail
-
-
- -#### 3. Reflective Chatbot - -This chatbot aims to respond to all relevant tasks the student requests by emphasising self-reflection through asking the student follow-up questions. The Chatbot is aware of the Question details, answer, worked solution and guidance from the lecturer. - -Some technical details: -
-LLM model: gpt-4o-mini (OpenAI)
-response time (on average): 10 seconds
-
-Helping approach: always responds with a follow-up question
-
-
## AI Chatbot Development From 4785d9c047a350ba6a5a7c4018ded59c5b2861e4 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Fri, 3 Oct 2025 11:50:26 +0100 Subject: [PATCH 04/14] mention of structured tutorial context --- docs/advanced/chat_functions/info.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced/chat_functions/info.md b/docs/advanced/chat_functions/info.md index df3bcaa10..3a9848735 100644 --- a/docs/advanced/chat_functions/info.md +++ b/docs/advanced/chat_functions/info.md @@ -5,7 +5,8 @@ Chatbot agents are AI Assistants that students can chat with to ask for help or The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model) which received information regarding: - the details of the Question the student is on currently, -- the answer and worked solutions for each Response Area of the Question, +- the final answer, structured tutorial, and worked solutions of the Question, +- the answer for each Response Area, - the student's progress on all parts of the Question, - the students's current previewed part, - the guidance time and tips form the lecturer. From 0559ba5769603a153fa1e007595a7a20f8b0dc8c Mon Sep 17 00:00:00 2001 From: neagualexa Date: Mon, 6 Oct 2025 09:51:57 +0100 Subject: [PATCH 05/14] update evaldocsloader package --- poetry.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 80d6baf04..18ba6d508 100644 --- a/poetry.lock +++ b/poetry.lock @@ -499,7 +499,7 @@ ujson = "^5.10.0" type = "git" url = "https://github.com/lambda-feedback/EvalDocsLoader.git" reference = "main" -resolved_reference = "c52ff00714be572287e4d4a87a3ac5378b090cce" +resolved_reference = "6c691bb3ebe0a89e7b9a76fa0c0edd5e3a4ee3f1" [[package]] name = "frozenlist" From 43956441c19fa9dd9f65f771d185ce3059d5b487 Mon Sep 17 00:00:00 2001 From: Jarka <57811074+jarkabaker@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:10:33 +0100 Subject: [PATCH 06/14] Release 2025/10/03 added --- docs/releases/detailed_releases.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/releases/detailed_releases.md b/docs/releases/detailed_releases.md index a15c7bf1e..aaba15634 100644 --- a/docs/releases/detailed_releases.md +++ b/docs/releases/detailed_releases.md @@ -1,3 +1,11 @@ +## Release 2025/10/03 + +- **b773-export-image-captions-to-json** – included image captions in exported question JSON files +- **b774-style-in-captions** – enabled LaTeX and Markdown support in image captions +- **b775-image-caption-character-limit** – removed the 250-character limit on image captions +- **b827-unenrol-many-users** – added a new feature to allow unenrolling multiple students at once in the teacher view +- **b828-display-student-stats-even-for-0-user-access** – stats graphs are now displayed even when they show *0 student accesses* (previously no graph was shown) + ## Release 2025/10/02 - **b516-set-layout-ui-upgrades** - new set layout with 2 adjustable panes From d228c4b13a83d7526b1ec8ed9b9825f50ea3447c Mon Sep 17 00:00:00 2001 From: neagualexa Date: Wed, 29 Jan 2025 13:25:39 +0000 Subject: [PATCH 07/14] update quickstart and introduce chatbots info for students --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index dba8e5a7a..13baa161c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -76,7 +76,7 @@ nav: - Chat functions: - Quickstart: "advanced/chat_functions/quickstart.md" - Testing Functions Locally: "advanced/chat_functions/local.md" - - Chat Agents Information: "advanced/chatbot_agents/info.md" + - Chat Agents Information: "advanced/chat_functions/info.md" # Configuration theme: From e650b109992eb379937725e5bf8eecb24bf8edf2 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Mon, 6 Oct 2025 10:16:26 +0100 Subject: [PATCH 08/14] page name change --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 13baa161c..01f1da0b3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -76,7 +76,7 @@ nav: - Chat functions: - Quickstart: "advanced/chat_functions/quickstart.md" - Testing Functions Locally: "advanced/chat_functions/local.md" - - Chat Agents Information: "advanced/chat_functions/info.md" + - AI Chatbots Information: "advanced/chat_functions/info.md" # Configuration theme: From 6f06b3902f7bee850c27c68b59a685e91e2c994a Mon Sep 17 00:00:00 2001 From: neagualexa Date: Tue, 14 Oct 2025 10:04:57 +0100 Subject: [PATCH 09/14] fix terminology --- docs/advanced/chat_functions/info.md | 4 ++-- docs/advanced/chat_functions/local.md | 8 ++++---- docs/advanced/chat_functions/quickstart.md | 16 ++++++++-------- docs/advanced/index.md | 4 ++-- docs/student/getting_started_student.md | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/advanced/chat_functions/info.md b/docs/advanced/chat_functions/info.md index 3a9848735..31d6e5e96 100644 --- a/docs/advanced/chat_functions/info.md +++ b/docs/advanced/chat_functions/info.md @@ -1,6 +1,6 @@ # AI Chatbots - More information -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. +Chatbots are LLM assistants that students can chat with to ask for help or further explanations regarding the Question that they are working on. Each chatbot has its own personality and approach to assisting the students. The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model) which received information regarding: @@ -30,4 +30,4 @@ Click on the links below for information on each chatbot: ## AI Chatbot Development -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. +Are you interested in developing your own chatbot? Then check out the [Quickstart guide](quickstart.md) to develop and deploy your own AI chat function for Lambda Feedback. diff --git a/docs/advanced/chat_functions/local.md b/docs/advanced/chat_functions/local.md index d3355601b..04644ac37 100644 --- a/docs/advanced/chat_functions/local.md +++ b/docs/advanced/chat_functions/local.md @@ -1,19 +1,19 @@ -# Running and Testing Agents Locally +# Running and Testing Chat function Locally -You can run the Python function for your agent itself by writing a `main()` function, or you can call the [`testbench_prompts.py`](https://github.com/lambda-feedback/lambda-chat/blob/main/src/agents/utils/testbench_prompts.py) script that runs a similar pipeline to the `module.py`. +You can run the Python function for your chat function itself by writing a `main()` function, or you can call the [`testbench_prompts.py`](https://github.com/lambda-feedback/lambda-chat/blob/main/src/agents/utils/testbench_prompts.py) script that runs a similar pipeline to the `module.py`. ```bash python src/agents/utils/testbench_prompts.py ``` -You can also use the `test_prompts.py` script to test the agents with example inputs from Lambda Feedback questions and synthetic conversations. +You can also use the `test_prompts.py` script to test the chat function with example inputs from Lambda Feedback questions and synthetic conversations. ```bash python src/agents/utils/test_prompts.py ``` ## Testing using the Docker Image [:material-docker:](https://www.docker.com/) -You can also build and run the docker pipeline for the agents. The chatbot agents are deployed onto a AWS Lambda serverless cloud function using the docker image. Hence, for final testing of your chatbots, we recommend completing those steps. +You can also build and run the docker pipeline for the chat function. The chatbot associated with the chat function is deployed onto a AWS Lambda serverless cloud function using the docker image. Hence, for final testing of your chatbot, we recommend completing those steps. #### Build the Docker Image diff --git a/docs/advanced/chat_functions/quickstart.md b/docs/advanced/chat_functions/quickstart.md index 8cfb5ea5c..eb96fe0d5 100644 --- a/docs/advanced/chat_functions/quickstart.md +++ b/docs/advanced/chat_functions/quickstart.md @@ -7,7 +7,7 @@ It's a function which calls Large Language Models (LLMs) to respond to the stude - question data - user data such as past responses to the problem -Chat functions host a chatbot agent. Chatbot Agents capture and automate the process of assisting students during their learning process when outside of classroom. +Chat functions host a chatbot. Chatbots capture and automate the process of assisting students during their learning process when outside of classroom. ## Getting Setup for Development @@ -16,12 +16,12 @@ Chat functions host a chatbot agent. Chatbot Agents capture and automate the pro - 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)**. - For existing functions: please make your changes on a new separate branch -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. +2. _If you are creating a new chatbot_, you can either edit the `scr/agents/base_agent` or copy it and rename it based on your chatbot's name. 3. You are now ready to start making changes and implementing features by editing each of the main function-logic files: 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/). - - the agent expects the following inputs when it being called: + - the chatbot expects the following inputs when it being called: Body with necessary Params: @@ -54,17 +54,17 @@ Chat functions host a chatbot agent. Chatbot Agents capture and automate the pro 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. - 3. _If you edited the agent file name_, make sure to add your agent `invoke()` function to the `module.py` file. + 3. _If you edited the chatbot agent file name_, make sure to add your chatbot `invoke()` function to the `module.py` file. 4. Update the `config.json` file with the chatbot's name. - 5. Please add a `README.md` file to describe the use and behaviour of your agent. + 5. Please add a `README.md` file to describe the use and behaviour of your chatbot. 4. Changes can be tested locally by running the pipeline tests using: ```bash pytest src/module_test.py ``` - [Running and Testing Agents Locally](local.md){ .md-button } + [Running and Testing Chat Functions Locally](local.md){ .md-button } 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. @@ -90,6 +90,6 @@ Chat functions host a chatbot agent. Chatbot Agents capture and automate the pro } }' -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. +6. Once the `dev` chat function 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 chat function. Please contact the ADMIN to provide the URLS for the `staging` and `prod` versions of your chat function. -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. +6. In order to make your new chat function available on any of the environments of the Lambda Feedback platform, you will have to get in contact with the ADMINS on the platform. diff --git a/docs/advanced/index.md b/docs/advanced/index.md index 6332786ec..c432ce85b 100644 --- a/docs/advanced/index.md +++ b/docs/advanced/index.md @@ -8,8 +8,8 @@ The fundamental idea of Lambda Feedback is that it calls external microservices Evaluate a student response and provide feedback: [Evaluation functions - Quickstart Guide](evaluation_functions/quickstart.md){ .md-button .md-button--primary style="width: 400px;"} -Dialogic conversations with students:
-[Chat functions - Quickstart guide ](chatbot_agents/quickstart.md){ .md-button .md-button--primary style="width: 400px;"} +AI Chatbots to converse with students:
+[Chat functions - Quickstart guide ](chat_functions/quickstart.md){ .md-button .md-button--primary style="width: 400px;"} All microservices are called over http. There is complete freedom in their implementation. Lambda Feedback also provides families of deployed microservices, using open source code available in our public GitHub repositories. diff --git a/docs/student/getting_started_student.md b/docs/student/getting_started_student.md index 54576e9e8..c87fb04a1 100644 --- a/docs/student/getting_started_student.md +++ b/docs/student/getting_started_student.md @@ -45,7 +45,7 @@ A pane where you can write down your thought process and notes for the previewed ![Canvas Interface](images/canvas_interface.png) #### Chat: -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. +A chat interface connecting you with helpful Chatbots. The Chatbots are AI Assistants that you can chat with to ask for help or further explanations regarding the Question that you are working on. ![Chat Interface](images/chat_interface.png) From 0badc0d9fa0232beeaf774e4199a8137b0d84324 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Tue, 14 Oct 2025 10:07:29 +0100 Subject: [PATCH 10/14] fix for consistency --- docs/advanced/chat_functions/info.md | 4 ++-- docs/advanced/chat_functions/quickstart.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/advanced/chat_functions/info.md b/docs/advanced/chat_functions/info.md index 31d6e5e96..076f5f6f3 100644 --- a/docs/advanced/chat_functions/info.md +++ b/docs/advanced/chat_functions/info.md @@ -7,8 +7,8 @@ The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikip - the details of the Question the student is on currently, - the final answer, structured tutorial, and worked solutions of the Question, - the answer for each Response Area, -- the student's progress on all parts of the Question, -- the students's current previewed part, +- the progress of the student on all parts of the Question, +- the current student previewed part, - the guidance time and tips form the lecturer. --- diff --git a/docs/advanced/chat_functions/quickstart.md b/docs/advanced/chat_functions/quickstart.md index eb96fe0d5..f395ad9f0 100644 --- a/docs/advanced/chat_functions/quickstart.md +++ b/docs/advanced/chat_functions/quickstart.md @@ -2,7 +2,7 @@ ## What is a Chat Function? -It's a function which calls Large Language Models (LLMs) to respond to the student's messages given contextual data: +A chat function is a function which calls Large Language Models (LLMs) to respond to the messages of students given contextual data: - question data - user data such as past responses to the problem @@ -16,7 +16,7 @@ Chat functions host a chatbot. Chatbots capture and automate the process of assi - 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)**. - For existing functions: please make your changes on a new separate branch -2. _If you are creating a new chatbot_, you can either edit the `scr/agents/base_agent` or copy it and rename it based on your chatbot's name. +2. _If you are creating a new chatbot_, you can either edit the `scr/agents/base_agent` or copy it and rename it based on the name of your chatbot. 3. You are now ready to start making changes and implementing features by editing each of the main function-logic files: 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/). @@ -56,7 +56,7 @@ Chat functions host a chatbot. Chatbots capture and automate the process of assi 3. _If you edited the chatbot agent file name_, make sure to add your chatbot `invoke()` function to the `module.py` file. - 4. Update the `config.json` file with the chatbot's name. + 4. Update the `config.json` file with the name of the chat function. 5. Please add a `README.md` file to describe the use and behaviour of your chatbot. From b96dcfb18677d524f6805077c34c683aa269a5a3 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Tue, 14 Oct 2025 10:10:21 +0100 Subject: [PATCH 11/14] fix chatbot naming --- docs/advanced/chat_functions/info.md | 6 +++--- docs/advanced/index.md | 2 +- docs/student/index.md | 2 +- docs/terminology.md | 2 +- mkdocs.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/advanced/chat_functions/info.md b/docs/advanced/chat_functions/info.md index 076f5f6f3..731d85d50 100644 --- a/docs/advanced/chat_functions/info.md +++ b/docs/advanced/chat_functions/info.md @@ -1,4 +1,4 @@ -# AI Chatbots - More information +# Chatbots - More information Chatbots are LLM assistants that students can chat with to ask for help or further explanations regarding the Question that they are working on. Each chatbot has its own personality and approach to assisting the students. @@ -15,7 +15,7 @@ The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikip ## Available Chatbots -Currently the students have access to the following AI Chatbots. Many others are in development. +Currently the students have access to the following Chatbots. Many others are in development. Click on the links below for information on each chatbot: @@ -28,6 +28,6 @@ Click on the links below for information on each chatbot: [3. Reflective Chatbot](https://github.com/lambda-feedback/reflectiveChatFunction/blob/main/docs/user.md) -## AI Chatbot Development +## Chat-function Development Are you interested in developing your own chatbot? Then check out the [Quickstart guide](quickstart.md) to develop and deploy your own AI chat function for Lambda Feedback. diff --git a/docs/advanced/index.md b/docs/advanced/index.md index c432ce85b..93c8a5e4c 100644 --- a/docs/advanced/index.md +++ b/docs/advanced/index.md @@ -8,7 +8,7 @@ The fundamental idea of Lambda Feedback is that it calls external microservices Evaluate a student response and provide feedback: [Evaluation functions - Quickstart Guide](evaluation_functions/quickstart.md){ .md-button .md-button--primary style="width: 400px;"} -AI Chatbots to converse with students:
+LLM-driven chatbots to converse with students:
[Chat functions - Quickstart guide ](chat_functions/quickstart.md){ .md-button .md-button--primary style="width: 400px;"} All microservices are called over http. There is complete freedom in their implementation. Lambda Feedback also provides families of deployed microservices, using open source code available in our public GitHub repositories. diff --git a/docs/student/index.md b/docs/student/index.md index 8d4d19b38..9ac78a237 100644 --- a/docs/student/index.md +++ b/docs/student/index.md @@ -19,7 +19,7 @@ The image above shows an example question, with numbers to indicate: 10. _Response area_, where student responses are entered and feedback is given 11. Feedback to the teacher (currently in flux regarding the design - 02/07/25) 12. Access to content 'below the line' providing extra support. -13. _Workspace_ - Opens tab with canvas and ai chatbot +13. _Workspace_ - Opens tab with canvas and chat 14. Comments ## Below the line diff --git a/docs/terminology.md b/docs/terminology.md index c23ed9aa5..e503b3ed4 100644 --- a/docs/terminology.md +++ b/docs/terminology.md @@ -56,4 +56,4 @@ This is an optional section, and so does not have to be included in any question ### Workspace -On the Question page, the students has access to their own workspace tab. Here they can find the "Canvas", for handwriting notes, and the "Chat", for conversing with an AI Chatbot on the question materials. +On the Question page, the students has access to their own workspace tab. Here they can find the "Canvas", for handwriting notes, and the "Chat", for conversing with an LLM-driven Chatbot on the question materials. diff --git a/mkdocs.yml b/mkdocs.yml index 01f1da0b3..bfcbf8413 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -76,7 +76,7 @@ nav: - Chat functions: - Quickstart: "advanced/chat_functions/quickstart.md" - Testing Functions Locally: "advanced/chat_functions/local.md" - - AI Chatbots Information: "advanced/chat_functions/info.md" + - Chatbots Information: "advanced/chat_functions/info.md" # Configuration theme: From 0ff307eaf6fbdb495321f766d3893dba65478cb0 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Tue, 14 Oct 2025 10:15:18 +0100 Subject: [PATCH 12/14] clarify context of chatbots --- docs/advanced/chat_functions/info.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/chat_functions/info.md b/docs/advanced/chat_functions/info.md index 731d85d50..a86712709 100644 --- a/docs/advanced/chat_functions/info.md +++ b/docs/advanced/chat_functions/info.md @@ -4,11 +4,11 @@ Chatbots are LLM assistants that students can chat with to ask for help or furth The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model) which received information regarding: -- the details of the Question the student is on currently, +- the details of the Question the student is on currently (the raw markdown content of the question (all parts & response areas), the question name and number, and the set name, number and description), - the final answer, structured tutorial, and worked solutions of the Question, - the answer for each Response Area, - the progress of the student on all parts of the Question, -- the current student previewed part, +- the current student previewed part is emphasised, - the guidance time and tips form the lecturer. --- From 6f90fcd4ceac0fc9f183f6e1f9a97990751b7843 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Wed, 15 Oct 2025 10:37:16 +0100 Subject: [PATCH 13/14] clarifications --- docs/advanced/chat_functions/info.md | 29 +++++++++++++--------- docs/advanced/chat_functions/quickstart.md | 18 +++++++------- docs/advanced/index.md | 2 +- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/docs/advanced/chat_functions/info.md b/docs/advanced/chat_functions/info.md index a86712709..eb671144c 100644 --- a/docs/advanced/chat_functions/info.md +++ b/docs/advanced/chat_functions/info.md @@ -1,21 +1,26 @@ -# Chatbots - More information +# Chat Functions - More information -Chatbots are LLM assistants that students can chat with to ask for help or further explanations regarding the Question that they are working on. Each chatbot has its own personality and approach to assisting the students. +Chat functions are the microservices that Lambda Feedback calls to provide the underlying functionality of a chatbot. Students can chat with the chatbots and ask for help or further explanations regarding the Question that they are working on. Each chatbot has its own personality and approach to assisting the students. -The Chatbots have at their basis a [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model) which received information regarding: +The chatbots have at their basis a [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model) which received information regarding: -- the details of the Question the student is on currently (the raw markdown content of the question (all parts & response areas), the question name and number, and the set name, number and description), -- the final answer, structured tutorial, and worked solutions of the Question, -- the answer for each Response Area, -- the progress of the student on all parts of the Question, -- the current student previewed part is emphasised, -- the guidance time and tips form the lecturer. +- the raw markdown content of the question the student is on currently, including: + - the question name, number and content + - the final answer, structured tutorial, and worked solutions of the question + - the guidance (blurb and time estimate) form the teacher for the question + - the set name, number and description + - all parts with their number, content and done status (current part emphasised) + - all response areas and their respective expected answers +- the progress of the student on all parts of the Question, including: + - the total number of responses and the number of wrong responses the student has made for each response area + - the last responses the student has made for each response area and the received feedback + - the time duration the student has spent on the respective question and current part on that day --- -## Available Chatbots +## Available Chat functions -Currently the students have access to the following Chatbots. Many others are in development. +Currently the students have access to the following chat functions that host their own specific chatbot. Many others are in development. Click on the links below for information on each chatbot: @@ -28,6 +33,6 @@ Click on the links below for information on each chatbot: [3. Reflective Chatbot](https://github.com/lambda-feedback/reflectiveChatFunction/blob/main/docs/user.md) -## Chat-function Development +## Chat Function Development Are you interested in developing your own chatbot? Then check out the [Quickstart guide](quickstart.md) to develop and deploy your own AI chat function for Lambda Feedback. diff --git a/docs/advanced/chat_functions/quickstart.md b/docs/advanced/chat_functions/quickstart.md index f395ad9f0..3c03ac7ea 100644 --- a/docs/advanced/chat_functions/quickstart.md +++ b/docs/advanced/chat_functions/quickstart.md @@ -16,12 +16,12 @@ Chat functions host a chatbot. Chatbots capture and automate the process of assi - 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)**. - For existing functions: please make your changes on a new separate branch -2. _If you are creating a new chatbot_, you can either edit the `scr/agents/base_agent` or copy it and rename it based on the name of your chatbot. +2. _If you are creating a new chatbot_, you can either edit the `src/agents/base_agent` or copy it and rename it based on the name of your chatbot. 3. You are now ready to start making changes and implementing features by editing each of the main function-logic files: - 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/). + 1. **`src/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/). - - the chatbot expects the following inputs when it being called: + - the chat function expects the following arguments when it being called: Body with necessary Params: @@ -52,7 +52,7 @@ Chat functions host a chatbot. Chatbots capture and automate the process of assi } ``` - 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. + 2. **`src/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. 3. _If you edited the chatbot agent file name_, make sure to add your chatbot `invoke()` function to the `module.py` file. @@ -67,15 +67,15 @@ Chat functions host a chatbot. Chatbots capture and automate the process of assi [Running and Testing Chat Functions Locally](local.md){ .md-button } -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. +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 available to any http requests. 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. 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: ```url - https://57glfwwf7d.execute-api.eu-west-2.amazonaws.com/default/chat/ + https://<***>.execute-api.eu-west-2.amazonaws.com/default/chat/ ``` !!! example "Example Request to chatFunctionBoilerplate-dev" - curl --location 'https://57glfwwf7d.execute-api.eu-west-2.amazonaws.com/default/chat/chatFunctionBoilerplate-dev' \ + curl --location 'https://<***>.execute-api.eu-west-2.amazonaws.com/default/chat/chatFunctionBoilerplate-dev' \ --header 'Content-Type: application/json' \ --data '{ "message": "hi", @@ -90,6 +90,6 @@ Chat functions host a chatbot. Chatbots capture and automate the process of assi } }' -6. Once the `dev` chat function 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 chat function. Please contact the ADMIN to provide the URLS for the `staging` and `prod` versions of your chat function. +7. Once the `dev` chat function 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 chat function. Please contact the ADMIN to provide you the URLS for the `staging` and `prod` versions of your chat function. -6. In order to make your new chat function available on any of the environments of the Lambda Feedback platform, you will have to get in contact with the ADMINS on the platform. +8. In order to make your new chat function available on any of the environments of the Lambda Feedback platform, you will have to get in contact with the ADMINS on the platform. diff --git a/docs/advanced/index.md b/docs/advanced/index.md index 93c8a5e4c..d96d773d7 100644 --- a/docs/advanced/index.md +++ b/docs/advanced/index.md @@ -11,7 +11,7 @@ Evaluate a student response and provide feedback: LLM-driven chatbots to converse with students:
[Chat functions - Quickstart guide ](chat_functions/quickstart.md){ .md-button .md-button--primary style="width: 400px;"} -All microservices are called over http. There is complete freedom in their implementation. Lambda Feedback also provides families of deployed microservices, using open source code available in our public GitHub repositories. +All microservices are called over http. There is complete freedom in their implementation subject to the expected API schema. Lambda Feedback also provides families of deployed microservices, using open source code available in our public GitHub repositories. This section of documentation is to help developers of microservices. The documentation is written assuming you have basic developer skills. From 54c54e657f31fa0650c77f324646fca38da11433 Mon Sep 17 00:00:00 2001 From: neagualexa Date: Thu, 16 Oct 2025 09:34:19 +0100 Subject: [PATCH 14/14] nav namwe fix --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index bfcbf8413..949ab4959 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -76,7 +76,7 @@ nav: - Chat functions: - Quickstart: "advanced/chat_functions/quickstart.md" - Testing Functions Locally: "advanced/chat_functions/local.md" - - Chatbots Information: "advanced/chat_functions/info.md" + - Chat Functions Information: "advanced/chat_functions/info.md" # Configuration theme: