GPT-based models have several inherent problems such as correctly aggregating figures in tabular structures and getting access to corporate data in database system. I will show an approach for connecting GPT to your custom database schema using the Langchain Python package. This allows text-based queries to be executed on the custom database schema, showing impressive results in GPTs ability to formulate complex SQL queries to the database and retrieving the correct information.