Get started with Kontext Copilot
Follow this guide to get started with Kontext Copilot.
Roadmap
The following diagram shows the roadmap and progress of Kontext Copilot.
Prerequisites
Make sure Kontext Copilot runs successfully on your computer. Follow Kontext Copilot Installation to setup the tool if you have not done that.
Features
Navigate to your local Kontext Copilot website: http://localhost:8100/ui.
Create a chat
On home page, click Start button to start a new chat.
There are two types of chats available:
Create General Chat session
Click New chat button under General Chat block.
It will open an window to allow you ask any questions to your Large Language Models (LLMs).
Type a question like the following:
Who created llama models?
The model will response something like the following screenshot:
Depends on the model and selected parameters, you may get different response. You can ask follow up questions too.
The Streaming toggle decides how the service provides response. When it is on, the response from LLMs will be shown in an streaming manner. If you turn it off, the answer will be shown after it is completed all at once.
Create Chat to Data session
For creating Chat to Data window, please click New chat button under Chat to Data section. You can click the New chat button on the secondary navigation bar if you already started a conversation.
To use Chat to Data feature, at least one data source is required. To help you evaluate the tool, a built-int database name Chinook is added. It is an SQLite sample database. For more details about this database, you can find it here: https://github.com/lerocha/chinook-database.
Upon the very first release, only SQL Server, SQLite, Duck DB, PostgreSQL databases and CSV and parquet files are supported with more added in the following days.
The chat window looks like the following screenshot:
Data source schema explorer
On the right side of the window, your selected data source schema are presented. It provides you information about your data sources.
Click on the vertical dots menu icon, more options will show up:
Click Sample data menu item, you will be able to view the data in the table directly as the following screenshot shows:
Click on "SQL: CREATE TABLE" or "SQL: SELECT", you can get the SQL scripts for the table:
Click on "Copy" button, the content will be copied into your clipboard.
Query your data source
Click on the Query tab of the main chat window, you can run SQL queries against your selected data source. The result will be returned as a table:
Ask a data question
Now switch back to main chat tab. Type the following question:
Show invoices amount by year
The model returns an answer with a SQL block.
Run SQL
When there is a SQL block present in the response, a Run SQL button will show up as the above screenshot does. Click on the action button:
Click Run button and copilot will run the SQL against your selected data source and return the results. You can also change the SQL before it runs.
Once the query is executed successfully, the result will be returned:
Sometimes the generate query might not be accurate, you can click Fix SQL Errors action button to ask LLMs to fix it. This is the core part of the tool that is still under development.
Chart visualizations
For the Run SQL action, Copilot also analyze whether there are appropriate charts to recommend. If any presents, it will show directly after the result message card:
More advanced charting options and save Charts are in the road-maps as mentioned earlier.
You can select different chart options if available:
Data sources config
Go to Data sources item on the left side navigation panel. You can add new data sources here:
Click on Add data source button to add new source.
Support for more database types and flat files like parquet, CSV, etc. are coming.
Tools
Two GenAI development tools are provided for people who want to try prompt engineering and embedding of different models.
Prompt engineering tool
You can try prompt engineering with any supported models. There are several built-in prompt templates are provided or you can input your own prompts. Please try the Streaming and JSON format toggles to find out the differences.
Settings
The Settings allow you to customize your Copilot.
For Chat to Data, please use the default LLMs settings; for General Chat, feel free to adjust the settings.
Report bugs
Issues ยท kontext-tech/kontext-copilot (github.com)
Provide your feedback
To provide your feedback, please register here. Once registered, your will get email notifications about a survey form to provide specific feedback. To ensure you don't miss any of the updates, please make sure to whitelist no-reply@kontext.tech in your email account.
You can raise feedback in the Discussions of the repo.
Feel free to add your comments in this article too.