The project demonstrates how VulcanSQL can leverage the power of Hugging Face Text Generation huggingface_text_generation filter with Llama-2-13b-chat-hf model to perform simple data queries.
Datasets: https://www.kaggle.com/datasets/jkanthony/world-university-rankings-202223
Used DuckDB connector be the data source and get the CSV result from DuckDB function.
- Install VulcanSQL CLI package, here use
yarn, you could usenpmby yourself.
$ yarn install -g @vulcan-sql/cli- Go to the project directory and install all the packages from
package.json
$ yarn install- Create your HuggingFace User Access Token and add to
vulcan.yaml. Please make sure you have HuggingFace Pro Account:
hf:
accessToken: "<your access token>"- Start VulcanSQL in the terminal
$ vulcan start --watchNow the API docs is auto generated at http://localhost:3000/doc and API /us/repositories already.
Here We use Postman to send API Request.
- Send the
Which university is the top-ranked university?question by query string:
VulcanSQL responds to the HuggingFace Text Generation original output, but converts it to a JSON string.
- Send the
Which university located in the UK is ranked at the top of the list?question by query string:
Same output format as the above, VulcanSQL responds to the HuggingFace Text Generation original output, but retrieve the generated_text string value.
For more information about VulcanSQL huggingface_text_generation filter, please see HuggingFace extension.


