The primary technical requirement was to leverage the client’s API to GPT 3.5 Turbo (licensed through Microsoft/OpenAI) alongside existing data warehousing of sales data in Snowflake. This setup allowed for on-demand data retrieval and basic inference for Sales Leadership.
Other technical requirements and limitations that shaped the needs of the project included:
- No retrieval augmented generation (RAG) as the client’s internal AI rules and administration had not yet approved the use of the Microsoft Azure GPT API for use in RAG or RAG-assisted applications.
- All data must be accessed through existing data entitlement processes.
- Tokenization costs of using the LLM API meant tokens sent to the LLM should be minimized to reduce production and testing costs.
- Query rates to the LLM API were limited on a per-team basis.
For the purposes of development and initial MVP deployment, a cloud based VM was created to host the chatbot code, which runs as Python Flask applications within containers on the VM. The chatbot service is accessible as a service through a secure API through which queries and metadata (username, session ID if applicable, etc.) are passed to the chatbot system.
The chatbot service ensures that the LLM can retrieve the right data to answer user questions and provide summary and/or inference while abiding by technical and institutional constraints. The KCS team created a methodology that ensured sufficient flexibility to answer free-form questions while also limiting computational costs and ensuring adherence to security measures.