DEV Community

Shrijith Venkatramana
Shrijith Venkatramana

Posted on

Improving DBChat - Part 10

Hi there! I'm Shrijith Venkatrama, the founder of Hexmos. Right now, I’m building LiveAPI, a super-convenient tool that simplifies engineering workflows by generating awesome API docs from your code in minutes.

In this series, I am on a journey to build for myself DBChat - a simple tool for using AI chat to explore and evolve databases.

See previous posts to get more context:

  1. Building DBChat - Explore and Evolve Your DB with Simple Chat (Part 1)
  2. DBChat: Getting a Toy REPL Going in Golang (Part 2)
  3. DBChat Part 3 - Configure , Connect & Dump Databases
  4. Chat With Your DB via DBChat & Gemini (Part 4)
  5. The Language Server Protocol - Building DBChat (Part 5)
  6. Making DBChat VSCode Extension - Ping Pong With LSP Backend (Part 6)
  7. Starting a VSCode Extension UI For DBChat (Part 7)
  8. Manage TOML Configuration From VSCode Extension - DBChat Part 8
  9. Getting DBChat Working For the First Time In VSCode - Part 9

A Video Demo (Step Up from Screenshots Last Time)

You can see me do a bunch of things in the following demo:

  1. See existing DB connections
  2. See various operations (show DB creds, edit, delete)
  3. Chat with a specific DB
  4. Generate SQL options from simple English prompt
  5. Execute SQL and show results
  6. Refine the SQL with more specific/pointed English prompt

What's New

  1. Fixed various annoyances with the chat window: Enter key not working, scrollbar resetting on response, etc
  2. Earlier DB credentials were exposed in the listing page; now there's a specific eye icon - which must be clicked to show any sensitive information
  3. I have a better testing setup now - with custom database, users, and so on. Will speed up development from now on due to the foundation.

Bugs and things learned

  1. With LLMs - I tried doing a bit of "vibe coding" that Karpathy talked about.
  2. It is important to commit/snapshot things as we vibe code, so that we can revert back to working state if things go wrong.
  3. LLMs get into loops and do the same errors again and again, and sometimes never seem to learn/improve. I have to jump in and fix things often.
  4. Had a pretty table come up once, but it was a hardcoded html from the LSP. So tried to dynamize it - for almost an hour. See above - the LLM went into a unproductive broken code loop. Had to set this challenge for another day.
  5. Found a bug with "Edit Connection". Maybe LLM interfered with my old code, but now, on clicking save, a new connection was created rather than updating old one.
  6. The "Show DB credentials" feature is not working reliably
  7. The "Add Connection" method via connection string is quite unfriendly. I want to give an LLM interface to add DBs. So you could paste pretty much anything, and it'll collect the necessary information.

Top comments (1)

Collapse
 
lincemathew profile image
LinceMathew

This looks great.