https://github.com/curent/pv-curve-llm

Create and analyze simple P-V Curves for Voltage Stability analysis using natural language

https://github.com/curent/pv-curve-llm

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.3%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Create and analyze simple P-V Curves for Voltage Stability analysis using natural language

Basic Info
  • Host: GitHub
  • Owner: CURENT
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 3.19 MB
Statistics
  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed 12 months ago
Metadata Files
Readme License

README.md

P-V Curve LLM

CURENT ERC Logo

Using LLMs to contextualize, create, and analyze Power-Voltage Curves (Nose Curves) for Power System Voltage Stability analysis. This project experiments with AI agents and to accomplish specific tasks with natural language.

License: MIT Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub last commit (master) Visitors

Installation & Run

Prerequisites

  • Python 3.8+
  • Ollama installed: https://www.ollama.com/download

Quick Start

```bash

Run terminal as administrator

python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt ollama pull llama3.1:8b ollama create pv-curve -f agent\Modelfile python main.py ```

To leave the virtual environment, enter deactivate.

Custom vector database

To setup a custom vector database, see agent/data/README.md

File Architecture

The agent/ directory contains the core AI agent system with the following architecture:

Core Entry Points: - main.py - Primary application entry point for local execution with terminal UI

LLM Configuration & Prompts: - Modelfile - Ollama model configuration defining system behavior and example conversations - prompts.py / prompts_json.py - Structured prompt templates for different agent functions (classification, parameter handling, generation, etc.)

Data Layer: - vector_db/ - Chroma vector database storing embedded knowledge for RAG retrieval - data/ - Training documents in markdown format covering power system theory and PV curve concepts - vector.py - Interface layer for vector database operations and similarity search - train.py - Script to process training data and build/update the vector database

Workflow Orchestration: - workflows/ - LangGraph workflow definitions coordinating agent behavior - compound_workflow.py - Complex multi-step task orchestration with planning and execution - simple_workflow.py - Basic single-step task routing and execution

Processing Nodes: - nodes/ - Individual processing units that handle specific agent functions - classifier_nodes.py - Message classification (question/parameter/generation) and routing logic - parameter_nodes.py - Parameter modification, validation, and state management - execution_nodes.py - Task execution including Q&A with RAG, parameter explanations, and analysis

Data Models: - models/ - Pydantic data structures defining system state and interfaces - state_models.py - Core state management and input parameter validation - plan_models.py - Multi-step plan structures for complex task decomposition

Domain Logic: - pv_curve/ - Power system simulation engine using pandapower for IEEE test systems - pv_curve.py - Core PV curve generation with voltage stability analysis

Support Utilities: - utils/common_utils.py - Helper functions for state management and display formatting

Agent Workflow

Agentic Workflow Diagram

License

This repository is licensed under the MIT License, unless specified otherwise in subdirectories.

GitHub Events

Total
  • Watch event: 1
  • Member event: 1
  • Push event: 24
  • Create event: 1
Last Year
  • Watch event: 1
  • Member event: 1
  • Push event: 24
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 13
  • Total Committers: 1
  • Avg Commits per committer: 13.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 13
  • Committers: 1
  • Avg Commits per committer: 13.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Matthew Cannavaro m****o@g****m 13

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels