REPOSITORY OVERVIEWLive repository statistics
★ 103Stars
⑂ 16Forks
◯ 3Open issues
◉ 103Watchers
79/100
OPENREPOHUB HEALTH SIGNALHealthy signals
A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
100 Community adoption25% weight
38 Maintenance state20% weight
85 License clarity10% weight
100 Project information10% weight
75 This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview
The HTN Planner automatically generates detailed plans utilizing OpenAI's GPT
and the Hierarchical Task Network (HTN) architecture.
The system generates tasks to achieve a goal using the LLM and then iteratively
decomposes it into subtasks that can be executed.
For best results use GPT-4, though other OpenSource LLMs may suffice with modifications to the api
Components:
- Decomposition - Takes a task and decomposes it into subtasks until the max depth is reached or the plan has failed.
The system keeps track of candidate decompositions and attempts to choose the best option. May exit early if results are good.
- Re-planning - When planning fails or part of a plan fails, re-planning occurs
- Task Execution - Identifies a task as an executable unit
- At present tasks are not actually executed in a terminal
- State Tracking - The LLM tracks and updates the state as execution occurs
- Text Parsing - Parses and extracts information from the natural language responses produced by the LLM
- Task Translation - Attempts to translate a low level task into a command or piece of code that can be executed.
- Frontend - A simple react frontend to display a hierarchy representing the plan
- Prompt Evolver - An application designed to automatically generate prompts using evolutionary algorithms
- Selection is performed using
roulette wheel selection
- Mutation is performed by the LLM
- Recombination is performed by the LLM using the results of selection
- Fitness is determined by the LLM and is normalized using a z-score so that results can be compared using standard deviations
- Environment topology is a 2D toroidal grid that adjusts to local or global optimization dynamically
- Logs - A large variety of logs are generated in the "logs" folder and function traces can be found in "function_trace.log"
- function_trace.log - Tracks all the function calls annotated with "@trace_function_calls"
- The logs in the "logs" folder each track a particular sub-system using the "log_response" function
- parsing_errors - Tracks any issues with parsing the output from the LLM so that updates can be made to the parser to fix the issue
- state_changes - Tracks the state transitions over time generated by the LLM based on the information it has
ToDo:
- Store the pieces of successful plans in a vector db for later use and reduce generation costs
- Continue to improve text parsing to deal with more edge cases
- More post-processing