A framework for applying Large Language Models (LLMs) to A2F Knowledge Portals, specifically designed to work with PIGEAN results.
This repository processes PIGEAN results and builds knowledge graphs for AI-powered portals. The project consists of three main components:
- KG Ingress: Processes PIGEAN results into a knowledge graph
- Portal AI Frontend: Next.js application for interacting with the knowledge graph
- Portal Tools: Tool server that exposes portal endpoints as LLM tools
The knowledge graph ingestion package processes PIGEAN results into a structured knowledge graph using LinkML schemas.
- Python 3.9+
- LinkML (
pip install linkml
)
The knowledge graph schema is defined in portal-model.yaml
using LinkML. To generate the Python model classes:
pip install linkml
gen-python portal-model.yaml > kg-ingress/kg_ingress/models/portal_model.py
- Navigate to the kg-ingress directory
- Follow the README instructions for setting up the ingestion pipeline
- Process your PIGEAN results through the pipeline to build the knowledge base
A modern Next.js application built with Tailwind CSS and shadcn/ui components for interacting with the knowledge graph.
- Node.js 18+
- pnpm
cd portal-ai
pnpm install
# Start the development server
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
A tool server that wraps various portal endpoints and exposes them as tools for LLMs through the Portal AI frontend.
- Python 3.9+
- uv (Python package installer and resolver)
- Docker (optional)
cd portal-tools
# Install dependencies using uv
uv pip install -e .
# Or if you want to create a virtual environment first
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
# Using Python directly
python -m portal_tools/app.py
# Using Docker
docker build -t portal-tools .
docker run -p 8000:8000 portal-tools
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request