Coder Social home page Coder Social logo

yhyu13 / thinker_decisionmakingassistant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aspadax/thinker_decisionmakingassistant

0.0 1.0 0.0 1.34 MB

Thinker provides personalized advice using Anthropic's Claude AI assistant based on your unique context.

Home Page: https://github.com/AspadaX/Thinker_DecisionMakingAssistant

License: MIT License

Python 100.00%

thinker_decisionmakingassistant's Introduction

Image description

Thinker - A Decision Making Assistant

Thinker provides personalized advice using Anthropic's Claude AI assistant based on your unique context.

This Python script implements a decision making assistant using the Tree of Thoughts prompting technique with the Claude API from Anthropic. It allows the user to iteratively explore potential actions by simulating and discussing interactive advice.

FIND ME ON DISCORD! I am pretty sure that guys like you who find this project are talented to make it BETTER! My discord: https://discord.gg/7bmgzFkn

Background

The Tree of Thoughts is a prompting approach that starts broad and gradually narrows down on useful specific ideas through an iterative cycle of generation, simulation, and ranking.

This script follows that pattern:

  • The user provides a situation
  • Claude generates potential scenarios
  • Claude suggests actions for each scenario
  • The actions are scored by feasibility via simulation
  • Top ranked suggestions are discussed interactively
  • By recursively prompting Claude to simulate and build on its own ideas, the assistant can rapidly explore the space of options and zoom in on targeted, relevant advice.

Here is a flowchart that explains how the second generation of Thinker works:

Image descriptionA flowchart for the underneath design of Thinker Gen.2

Features

  • Saves conversation history for contextual awareness
  • Uses NLP embedding similarity to find relevant past situations
  • Generates multi-step Tree of Thoughts:
  • Situational summary
  • Potential scenarios
  • Suggested actions
  • Simulated evaluations
  • Interactive discussion
  • Ranks suggestions by running Claude simulations
  • Extracts representative suggestions via clustering
  • Allows interactive elaboration on top advice

Usage

To run locally:

  • Sign up for Claude API key at anthropic.com
  • Clone repo and install requirements
  • Set ANTHROPIC_API_KEY environment variable
  • Run python claude_decision_maker.py
  • Enter your situation and thought process when prompted
  • Interactively discuss top recommendations
  • The core prompting cycle is implemented in get_scenario_responses, parse_suggestions, add_scores, interactive_advice and other functions defined in the script.

Roadmap

Ideas and improvements welcome! Some possibilities:

  • Integrate OpenAI models, or other capable LLMs, as the underneath engine.
  • Alternative simulation scoring methods
  • Front-end UI for better experience
  • Integration with user calendar and task tracking
  • Containerization for easy deployment
  • More refined clustering and ranking approaches
  • The core prompting framework could also be extended to other use cases like creative ideation, strategic planning, and more. Please open issues or PRs if you build on this project!

License

This project is licensed under the MIT license. Feel free join my efforts in making this app more useful and helpful to people! Just do not forget to reference this project when needed.

thinker_decisionmakingassistant's People

Contributors

aspadax avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.