Zero-shot reasoning allows models to make inferences without prior examples. This repository provides structured output for visual zero-shot reasoning using the Ollama framework. By leveraging large language models (LLMs), we create a backend and frontend system that supports both chain-of-thought and graph-of-thought reasoning. This project aims to simplify complex reasoning tasks and enhance the capabilities of AI in understanding visual inputs.
- Backend Support: Built with FastAPI and Uvicorn for efficient processing.
- Frontend Visualization: Utilizes Vis.js for interactive data visualization.
- Chain-of-Thought Reasoning: Supports multi-step reasoning processes.
- Graph-of-Thoughts: Implements a graphical representation of reasoning paths.
- Large Language Models: Integrates state-of-the-art LLMs for enhanced reasoning capabilities.
- Zero-Shot Learning: Allows models to perform tasks without specific training examples.
To set up the project, follow these steps:
-
Clone the repository:
git clone https://github.com/Ahta14/zeroshot-reasoning.git
-
Navigate to the project directory:
cd zeroshot-reasoning
-
Install the required dependencies:
pip install -r requirements.txt
-
Start the backend server:
uvicorn app.main:app --reload
-
Open your browser and navigate to
http://localhost:8000
to access the frontend.
After installation, you can start using the zero-shot reasoning capabilities. Hereβs how:
- Access the API: Use the provided endpoints to submit visual inputs for reasoning.
- Visualize Results: The frontend will display reasoning paths and outputs using Vis.js.
- Experiment: Try different visual inputs to see how the model responds without prior training.
For detailed usage instructions, check the Releases section for example configurations and data formats.
The repository follows a standard structure for easy navigation:
zeroshot-reasoning/
β
βββ app/
β βββ main.py # Entry point for the FastAPI application
β βββ models.py # Defines data models for input and output
β βββ routes.py # API route definitions
β βββ utils.py # Utility functions for processing
β
βββ frontend/
β βββ index.html # Main HTML file for the frontend
β βββ script.js # JavaScript for frontend logic
β βββ styles.css # CSS for styling the frontend
β
βββ requirements.txt # List of dependencies
βββ README.md # Project documentation
We welcome contributions to enhance the project. To contribute:
- Fork the repository.
- Create a new branch for your feature or fix.
- Make your changes and commit them.
- Push your changes to your fork.
- Create a pull request to the main repository.
Please ensure your code follows the existing style and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
For further updates and releases, visit the Releases section.