Skip to content

๐Ÿจ Bookoala is an LLM-based autonomous agent designed to help users find and select books based on their preferences.

Notifications You must be signed in to change notification settings

swax10/bookoala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿจ Bookoala: A Book Recommendation AI

๐Ÿจ Bookoala is an LLM-based autonomous agent designed to help users find and select books based on their preferences.

๐Ÿ“š Table of Contents

๐ŸŽฏ Problem Statement

Develop a simple LLM-based autonomous agent for book recommendations with the following workflow:

  1. Allow users to find the top books in fiction or any genre.

๐Ÿ”„ Workflow

The agent follows these steps:

a. User asks the agent for the top 100 books in any genre. b. Agent finds the top 10 books in the given genre from the 100 books. c. Agent helps the user select 1 book from the top ten based on their preferences. d. Agent concludes the workflow with a thank you message. e. The agent is exposed via a REST API endpoint using Streamlit for easy testing.

๐Ÿ› ๏ธ Technology Stack

  • LLM: Ollama (llama3:instruct model)
  • Frontend: Streamlit
  • Backend: Python
  • Agent Framework: Custom implementation
  • Dependency Management: Poetry

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.12+
  • Ollama installed and running locally
  • Poetry for dependency management

Installation

  1. Clone the repository:
git clone https://github.com/swax10/bookoala.git
cd bookoala
  1. Install dependencies using Poetry:
poetry install
  1. Run the Streamlit app:
streamlit run main.py

๐Ÿ–ฅ๏ธ Usage

  1. Open your web browser and go to http://localhost:8501.
  2. You'll see the Bookoala interface with a chat input.
  3. Start by asking for book recommendations in any genre.
  4. Follow the agent's prompts to narrow down your selection.

๐Ÿ—๏ธ Project Structure

  • main.py: The main Streamlit application
  • agents/bookoala.py: The Bookoala agent implementation
  • models/: Contains the Ollama and OpenAI model implementations
  • tools/: Contains the tools used by the agent (e.g., book recommendation tool)
  • prompts/: Contains prompt templates used by the agent
  • pyproject.toml: Poetry configuration and dependency management

๐Ÿค” Design Decisions

  1. LLM Choice: We chose to use Ollama with the llama3:instruct model for its balance of performance and accessibility. It can run locally, which is beneficial for privacy and cost considerations.

  2. Agent Architecture: We implemented a custom agent architecture that allows for flexible tool use and easy extension. This approach was chosen over existing frameworks to have more control over the agent's behavior and to tailor it specifically to the book recommendation task.

  3. Streamlit Frontend: Streamlit was selected for its simplicity in creating interactive web applications with Python. It allows for rapid prototyping and easy deployment, making it ideal for this demonstration project.

  4. Tool-based Approach: The agent uses a tool-based approach, where different functionalities (like book searching) are encapsulated in separate tools. This modular design allows for easy addition of new capabilities in the future.

  5. Poetry for Dependency Management: We chose Poetry for its robust dependency management and packaging capabilities, ensuring consistency across development environments and simplifying the deployment process.

๐ŸŽฅ Demo Video

Check out our demo video showcasing the Bookoala in action:

Bookoala.mp4

๐Ÿ”ฎ Future Improvements

  • Integrate with a larger book database for more comprehensive recommendations
  • Implement user profiles to remember preferences across sessions
  • Add more sophisticated natural language processing for better understanding of user requests
  • Expand the agent's capabilities to include book summaries, author information, etc.

About

๐Ÿจ Bookoala is an LLM-based autonomous agent designed to help users find and select books based on their preferences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages