Monthly Archives: April 2024

Role-play AI agent

AI agent is amazing, promising, and useful in many business scenaria. With the increasing capability of large language model such as ChatGPT-4 and opensource models such as Llama3, it beccomes easy to develop LLM based agent to help the human to do tedious work. For example, it can replace coacher with AI agent to train the junior salesman, while the latter can play with the AI agent to improve their pitch skill. What you do is to select suitable opensource tools and models and to write promts, i.e. prompt engineering, for each application scenario. The following image is the screenshot of the role-agent demo what I build.

AI agent is salesman

Human user is a buyer

Ai agent is buyer

Human user is salesman

What you need to build the demo:

  • Streamlit: UI design
  • Ollama: manage open-source LLM.
  • LangChain: build LLM based chat pipeline
  • Prompt engineering: according to the task and role, write prompt.

Collection of prompt engineering

Prompty engineering is a critical part in developing AI agent. To make AI function as a particular role, e.g. insuarance salesman, insurance buyer, math teach, ….., it is necessary to write the task-specifc promt.

[Github] collection of prompt examples to be used with the ChatGPT model.

[Github] a curated list of the best system prompts for OpenAI’s ChatGPT, enabling developers and users to customize their AI’s behavior and interaction style