Skip to content
sid-unizarPublic

About

Hybrid RDF+RAG question-answering system for extreme weather events

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Borrajas: A flexible hybrid question-answering system for extreme weather events.

Overview

Borrajas is a prototype of a question-answering system that can answer questions about extreme weather events developed within the CLASiK project. It uses both RAG and RDF sources to answer questions.

Installation

The project uses uv for development, make sure you install it first.

Clone the Repository

git clone https://github.com/your-org/borrajas.git
cd borrajas

Install dependencies

The project supports multiple backends and optional dependencies. You need to install at least one backend.

LangGraph backend

uv sync --extra langgraph

Pydantic-AI backend

uv sync --extra pydantic

ChainLit UI

To use ChainLit UI, install additional dependencies in the ui group, e.g.:

uv sync --extra langgraph --extra ui

All extras

uv sync --all-extras

Setting up an LLM connection

At the moment, only Ollama API is supported. Make sure you have Ollama installed and running, and you are signed in to ollama cloud if you are using cloud-based models.

Make a copy of the .env.example file and rename it to .env, then fill in the required values if needed:

  • OLLAMA_HOST: The host of the Ollama API (usually the default is fine)
  • OLLAMA_MODEL: The model to use (e.g., gemma4

Usage

There are three ways to run the project:

  • borrajas-cli: CLI interface, including batch mode
  • borrajas-eval: Run evaluation on a dataset with a custom config and custom prompts
  • borrajas-ui: Chatbot with ChainLit UI

CLI

# Basic usage
borrajas-cli --backend langgraph --ttl data/sinobas-sample.ttl "How many tornadoes have occurred in the last 10 years in Cantabria?"

# Batch mode
borrajas-cli --backend langgraph --ttl data/sinobas-sample.ttl -i data/sample-questions.txt

# Using config file
borrajas-cli --config config.yaml -i data/sample-questions.txt

Evaluation

borrajas-eval --backend langgraph --config eval/config.yaml

UI

borrajas-ui --backend langgraph --ttl data/sinobas-sample.ttl

About

Hybrid RDF+RAG question-answering system for extreme weather events

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages