Skip to main content

A python library for brainstorming by multiple LLMs.

Project description

monju

monju: Multi-AI Brainstorming Framework

Monju is a powerful multi-AI brainstorming framework designed to generate, organize, and evaluate ideas using various Large Language Models (LLMs).

The Japanese proverb “三人寄れば文殊の知恵” (San nin yoreba monju no chie) is often translated into English as “Two heads are better than one”. However, a more literal translation would be “When three people gather, they have the wisdom of Manjushri”.

Features

  • Generate ideas based on a given theme
  • Organize ideas into mindmaps and affinity diagrams (class diagrams)
  • Evaluate generated ideas
  • Support for multiple LLM providers (e.g. OpenAI, Anthropic, Google)
  • Customizable parameters for idea generation

The project started as a web app monju.ai, which was released in July 2024.

This library is the core of monju.ai that does not include frontend part.

For general information of monju.ai, see my article from Medium "monju.ai: a creativity enhancement tool that uses multiple generative AIs to generate ideas and organize mind maps".

Brainstorming Process by monju

For the general approach to brainstorming, see Brainstorming - Wikipedia.

The brainstorming process by monju consists of three main steps:

  1. Generate ideas in list
  2. Organize ideas in mindmap and class diagram in Mermaid
  3. Evaluate ideas including overall, good points, and areas for improvement

Each step is implemented as a method in the Monju class.

Both mindmap and class diagram are described in Mermaid text format. Output can be drawn by any mermaid-compatible tools mainly in JavaScript, e.g. Mermaid Live Editor.

KJ method (Affinity Diagram)

In Japan, another popular ideation tool "KJ method" is often used as part of brainstorming. This method might be known as "affinity diagram" in English.

The KJ method is to categorize ideas into groups based on their similarity. Each idea is written on a single card, then categorized into groups with labels.

People in Japan hesitate open discussion. Writing in cards and categorizing them into groups might help open mind.

In monju, affinity diagram is generated as class diagram of Mermaid. This process is called "pseudo KJ method" in this library.

For details of KJ method, see Affinity diagram - Wikipedia.

Installation

pip install monju

Requirements

  • Python 3.10 or later
  • API keys for the LLM providers

This library uses LLMMaster, a unified interface to access major LLM providers. Set API keys following the instructions from LLM Master, another repository by the same author.

Usage

Batch Execution

By just one call, all the steps of brainstorming can be done. Here is an typical example.

import json
from pathlib import Path

from monju import Monju

API_KEY = Path('your_api_keys.txt').read_text(encoding='utf-8')

# Use this function to arrange parameters in dictionary format.
def pack_parameters(**kwargs):
    return kwargs


# Initialize monju with your API keys and brainstorming parameters
params = pack_parameters(
    theme="How to survive in the era of emerging AI?",
    ideas=5,
    freedom=0.2,
    language="en"
)
bs = Monju(api_keys=API_KEY, verbose=True, reduction=True, **params)

# Start the brainstorming process
bs.brainstorm()

# Show the results
print(f'Result:\n{json.dumps(bs.record, indent=2, ensure_ascii=False)}')

Before running, set your API keys for the dedicated LLMs in your_api_keys.txt. The format shall be:

ANTHROPIC_API_KEY=your_anthropic_key
GOOGLE_API_KEY=your_google_key
OPENAI_API_KEY=your_openai_key

By default, monju uses Anthropic, Google and OpenAI models. Keep in mind to secure handling of your API keys.

Information related to a session is stored in bs.record as dict. You can extract items you want, or print/save this record as JSON.

The parameter verbose prints progress on your screen if set True (default is False).

NEW for v0.3.0

The parameter reduction will try to remove duplicate ideas generated by multiple LLMs. It is often a hard work to manually adjust generated mindmap/affinity diagram consisting of many ideas on screen. By setting this parameter True, it may support reducing some similar ideas and make clearer mindmap and affinity diagram (default is False).

Step-by-Step Execution

There is another way to use monju by calling each process step by step.

The following example works equivalently to the batch execution example above.

import json
from pathlib import Path

from monju import Monju
from monju.config import KEY_IDEA_REDUCTION
from monju.config import KEY_MINDMAP
from monju.config import KEY_CLASS_DIAGRAM


# Initialize monju with your API keys and brainstorming parameters
bs = Monju(
    api_keys=Path('your_api_keys.txt').read_text(encoding='utf-8'),
    verbose=True,
    reduction=True,
    **{
        "theme": "How to survive in the era of emerging AI?",
        "ideas": 5,
        "freedom": 0.2,
        "language": "en"
    }
)
print(f"Status: {bs.status}")

bs.generate_ideas()
print(f"Status: {bs.status}")

bs.reduce_ideas(**{
    KEY_IDEA_REDUCTION: {
        "provider": "deepseek",
        "temperature": 0.0
    }
})
print(f"Status: {bs.status}")

bs.organize_ideas(**{
    KEY_MINDMAP: {
        "provider": "deepseek",
        "temperature": 0.0
    },
    KEY_CLASS_DIAGRAM: {
        "provider": "deepseek",
        "temperature": 0.0
    }
})
print(f"Status: {bs.status}")

bs.evaluate_ideas(**{
    "openai": {
        "provider": "openai",
        "model": "o3-mini",
        "reasoning_effort": "high"
    },
    "anthropic": {
        "provider": "anthropic",
        "model": "claude-3-7-sonnet-20250219",
        "thinking": {"type": "enabled", "budget_tokens": 10000},
        "max_tokens": 128000
    },
})
print(f"Status: {bs.status}")

bs.verify()
print(f"Status: {bs.status}")

# Show the results
print(f'Result:\n{json.dumps(bs.record, indent=2, ensure_ascii=False)}')

The latest models of thinking/reasoning can also be used, especially for evaluation.

Types of bs.status are explained in later section.

Input Parameters

There are several parameters to set for Monju class:

  • Constractor parameters:
    • api_keys (str): API keys for LLMs in LLMMaster manner
    • verbose (bool): print progress for debugging, default is False
    • reduction (bool): remove duplicate ideas, default is False
  • Brainstorming parameters params as dict:
    • theme (str) required: theme or topic of brainstorming, a.k.a. prompt
    • ideas (int): number of ideas to generate by each LLM
    • freedom (float): value of freedom-looking thinking for each LLM, a.k.a. temperature, between 0 and 1. Higher more free-thinking, lower more concervative.
    • language (str): language for output, default is en and must be followed by two-letter code defined in ISO 639-1

Output Format

Results, bs.record in the examples, are given in dict. Here is an actual output of the batch brainstorming given the code above.

{
  "input": {
    "theme": "How to survive in the era of emerging AI?",
    "ideas": 5,
    "freedom": 0.2,
    "language": "en",
    "idea_generation": {
      "openai": {
        "provider": "openai",
        "model": "gpt-4.1-nano",
        "prompt": "\nPurpose: Generate 5 ideas on the following \"Theme\" and meeting the \"Conditions\".\n\nConditions:\n1. Propose ideas with free thinking.\n2. Return the results in bullet points as shown in the \"Format\".\n3. The language of the output is in en of ISO 639-1 format.\n4. Do not include your explanations.\n5. Do not add any unnecessary decorations to the bullet points.\n\nTheme: How to survive in the era of emerging AI?\n\nFormat:\n- Idea\n",
        "temperature": 0.2
      },
      "anthropic": {
        "provider": "anthropic",
        "model": "claude-3-haiku-20240307",
        "prompt": "\nPurpose: Generate 5 ideas on the following \"Theme\" and meeting the \"Conditions\".\n\nConditions:\n1. Propose ideas with free thinking.\n2. Return the results in bullet points as shown in the \"Format\".\n3. The language of the output is in en of ISO 639-1 format.\n4. Do not include your explanations.\n5. Do not add any unnecessary decorations to the bullet points.\n\nTheme: How to survive in the era of emerging AI?\n\nFormat:\n- Idea\n",
        "temperature": 0.2
      },
      "google": {
        "provider": "google",
        "model": "gemini-1.5-flash",
        "prompt": "\nPurpose: Generate 5 ideas on the following \"Theme\" and meeting the \"Conditions\".\n\nConditions:\n1. Propose ideas with free thinking.\n2. Return the results in bullet points as shown in the \"Format\".\n3. The language of the output is in en of ISO 639-1 format.\n4. Do not include your explanations.\n5. Do not add any unnecessary decorations to the bullet points.\n\nTheme: How to survive in the era of emerging AI?\n\nFormat:\n- Idea\n",
        "temperature": 0.2
      }
    },
    "idea_reduction": {
      "provider": "google",
      "model": "gemini-2.0-flash",
      "prompt": "\nPurpose: Remove duplicate ideas from the \"Idea List\".\n\nConditions:\n1. The language of the output is in en of ISO 639-1 format.\n2. Return the results also in the same list format.\n3. Do not include your explanations.\n4. Do not add any unnecessary decorations to the bullet points.\n\nIdea List:\n- Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving.  \n- Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities.  \n- Build strong human-centric networks and collaborations that AI cannot easily replicate.  \n- Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust.  \n- Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly.\n- Develop strong critical thinking and problem-solving skills to navigate the changing landscape\n- Continuously upskill and adapt to new technologies and AI-driven processes\n- Cultivate a growth mindset and embrace lifelong learning\n- Specialize in niche areas that are less susceptible to AI automation\n- Collaborate with AI systems to enhance human capabilities and productivity\n- Develop highly specialized skills AI can't easily replicate.\n- Focus on creativity, critical thinking, and emotional intelligence.\n- Become an AI trainer or developer.\n- Embrace lifelong learning and adaptability.\n- Build strong human networks and collaborations.\n"
    },
    "mindmap": {
      "provider": "openai",
      "model": "gpt-4o",
      "prompt": "\nPurpose: Organize the \"Idea List\" into a mindmap based on the \"Theme\" and meeting the \"Conditions\".\n\nTheme: How to survive in the era of emerging AI?\n\nConditions:\n1. Output the result in \"Format\" as Mermaid chart. Do not include your explanations.\n2. Group similar items in the \"Idea List\" into several groups and create a hierarchical structure.\n3. The language of the output is in en of ISO 639-1 format.\n\nIdea List:\n- Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving.\n- Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities.\n- Build strong human-centric networks and collaborations that AI cannot easily replicate.\n- Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust.\n- Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly.\n- Specialize in niche areas that are less susceptible to AI automation\n- Collaborate with AI systems to enhance human capabilities and productivity\n- Become an AI trainer or developer.\n- Develop highly specialized skills AI can't easily replicate.\n\nFormat:\n```mermaid\nmindmap\n    How to survive in the era of emerging AI?\n        (Summary of ideas)\n            (Idea item)\n```\n"
    },
    "class_diagram": {
      "provider": "openai",
      "model": "gpt-4o",
      "prompt": "\nPurpose: Organize the \"Idea List\" into a class diagram based on the \"Theme\" and meeting the \"Conditions\".\n\nTheme: How to survive in the era of emerging AI?\n\nConditions:\n1. Output the result in \"Format\" as Mermaid chart. Do not include your explanations.\n2. Make 3 to 7 groups by finding similar items in the \"Idea List\",  and define `class` for output.\n3. Look for classes that seem related and draw line between them using `-->` for output.\n4. The language of the output is in en of ISO 639-1 format.\n\nIdea List:\n- Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving.\n- Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities.\n- Build strong human-centric networks and collaborations that AI cannot easily replicate.\n- Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust.\n- Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly.\n- Specialize in niche areas that are less susceptible to AI automation\n- Collaborate with AI systems to enhance human capabilities and productivity\n- Become an AI trainer or developer.\n- Develop highly specialized skills AI can't easily replicate.\n\nFormat:\n```mermaid\nclassDiagram\n    class ClassA {\n        idea\n    }\n    class ClassB {\n        idea\n    }\n    ClassA --> ClassB\n```\n"
    },
    "idea_evaluation": {
      "openai": {
        "provider": "openai",
        "model": "gpt-4.1-nano",
        "prompt": "\nPurpose: Evaluate the \"Mindmap\" based on the \"Theme\" and meeting the \"Conditions\".\n\nTheme: How to survive in the era of emerging AI?\n\nConditions:\n1. Write \"Overall Evaluation\", \"Good Points\", and \"Areas for Improvement\" according to the \"Format\".\n2. Write as concisely and focused on key points as possible.\n3. The language of the output is in en of ISO 639-1 format.\n4. Do not add any unnecessary decorations to the bullet points.\n\nMindmap:\nmindmap\n    How to survive in the era of emerging AI?\n        Adaptable Skills\n            Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving\n            Develop highly specialized skills AI can't easily replicate\n            Specialize in niche areas that are less susceptible to AI automation\n        Continuous Learning\n            Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities\n            Become an AI trainer or developer\n        Human-AI Collaboration\n            Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly\n            Collaborate with AI systems to enhance human capabilities and productivity\n            Build strong human-centric networks and collaborations that AI cannot easily replicate\n        Ethical Use of AI\n            Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust\n\n\nFormat:\n- Overall Evaluation:\n  - Bullet point\n- Good Points:\n  - Bullet point\n- Areas for Improvement:\n  - Bullet point\n"
      },
      "anthropic": {
        "provider": "anthropic",
        "model": "claude-3-haiku-20240307",
        "prompt": "\nPurpose: Evaluate the \"Mindmap\" based on the \"Theme\" and meeting the \"Conditions\".\n\nTheme: How to survive in the era of emerging AI?\n\nConditions:\n1. Write \"Overall Evaluation\", \"Good Points\", and \"Areas for Improvement\" according to the \"Format\".\n2. Write as concisely and focused on key points as possible.\n3. The language of the output is in en of ISO 639-1 format.\n4. Do not add any unnecessary decorations to the bullet points.\n\nMindmap:\nmindmap\n    How to survive in the era of emerging AI?\n        Adaptable Skills\n            Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving\n            Develop highly specialized skills AI can't easily replicate\n            Specialize in niche areas that are less susceptible to AI automation\n        Continuous Learning\n            Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities\n            Become an AI trainer or developer\n        Human-AI Collaboration\n            Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly\n            Collaborate with AI systems to enhance human capabilities and productivity\n            Build strong human-centric networks and collaborations that AI cannot easily replicate\n        Ethical Use of AI\n            Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust\n\n\nFormat:\n- Overall Evaluation:\n  - Bullet point\n- Good Points:\n  - Bullet point\n- Areas for Improvement:\n  - Bullet point\n"
      },
      "google": {
        "provider": "google",
        "model": "gemini-2.0-flash",
        "prompt": "\nPurpose: Evaluate the \"Mindmap\" based on the \"Theme\" and meeting the \"Conditions\".\n\nTheme: How to survive in the era of emerging AI?\n\nConditions:\n1. Write \"Overall Evaluation\", \"Good Points\", and \"Areas for Improvement\" according to the \"Format\".\n2. Write as concisely and focused on key points as possible.\n3. The language of the output is in en of ISO 639-1 format.\n4. Do not add any unnecessary decorations to the bullet points.\n\nMindmap:\nmindmap\n    How to survive in the era of emerging AI?\n        Adaptable Skills\n            Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving\n            Develop highly specialized skills AI can't easily replicate\n            Specialize in niche areas that are less susceptible to AI automation\n        Continuous Learning\n            Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities\n            Become an AI trainer or developer\n        Human-AI Collaboration\n            Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly\n            Collaborate with AI systems to enhance human capabilities and productivity\n            Build strong human-centric networks and collaborations that AI cannot easily replicate\n        Ethical Use of AI\n            Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust\n\n\nFormat:\n- Overall Evaluation:\n  - Bullet point\n- Good Points:\n  - Bullet point\n- Areas for Improvement:\n  - Bullet point\n"
      }
    }
  },
  "output": {
    "elapsed_time": [
      1.127,
      2.176,
      5.606,
      3.07
    ],
    "ideas": {
      "openai": "- Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving.  \n- Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities.  \n- Build strong human-centric networks and collaborations that AI cannot easily replicate.  \n- Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust.  \n- Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly.",
      "anthropic": "- Develop strong critical thinking and problem-solving skills to navigate the changing landscape\n- Continuously upskill and adapt to new technologies and AI-driven processes\n- Cultivate a growth mindset and embrace lifelong learning\n- Specialize in niche areas that are less susceptible to AI automation\n- Collaborate with AI systems to enhance human capabilities and productivity",
      "google": "- Develop highly specialized skills AI can't easily replicate.\n- Focus on creativity, critical thinking, and emotional intelligence.\n- Become an AI trainer or developer.\n- Embrace lifelong learning and adaptability.\n- Build strong human networks and collaborations."
    },
    "idea_list": "- Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving.\n- Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities.\n- Build strong human-centric networks and collaborations that AI cannot easily replicate.\n- Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust.\n- Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly.\n- Specialize in niche areas that are less susceptible to AI automation\n- Collaborate with AI systems to enhance human capabilities and productivity\n- Become an AI trainer or developer.\n- Develop highly specialized skills AI can't easily replicate.",
    "mindmap": "mindmap\n    How to survive in the era of emerging AI?\n        Adaptable Skills\n            Develop adaptable skills that complement AI, such as creative thinking, emotional intelligence, and complex problem-solving\n            Develop highly specialized skills AI can't easily replicate\n            Specialize in niche areas that are less susceptible to AI automation\n        Continuous Learning\n            Foster continuous learning and stay updated on AI advancements to anticipate and leverage new opportunities\n            Become an AI trainer or developer\n        Human-AI Collaboration\n            Explore and invest in AI-human hybrid roles where human intuition and AI efficiency work together seamlessly\n            Collaborate with AI systems to enhance human capabilities and productivity\n            Build strong human-centric networks and collaborations that AI cannot easily replicate\n        Ethical Use of AI\n            Create ethical guidelines and frameworks to ensure responsible AI use and maintain public trust\n",
    "class_diagram": "classDiagram\n    class SkillsDevelopment {\n        Develop adaptable skills\n        Specialize in niche areas\n        Develop highly specialized skills\n    }\n    class ContinuousLearning {\n        Foster continuous learning\n        Stay updated on AI advancements\n    }\n    class HumanCollaboration {\n        Build strong human-centric networks\n        Collaborate with AI systems\n    }\n    class EthicalAI {\n        Create ethical guidelines\n        Ensure responsible AI use\n    }\n    class AIHybridRoles {\n        Explore AI-human hybrid roles\n    }\n    class AIExpertise {\n        Become an AI trainer\n        Become an AI developer\n    }\n    SkillsDevelopment --> ContinuousLearning\n    ContinuousLearning --> HumanCollaboration\n    HumanCollaboration --> EthicalAI\n    EthicalAI --> AIHybridRoles\n    AIHybridRoles --> AIExpertise\n",
    "evaluation": {
      "openai": "- Overall Evaluation:\n  - The mindmap effectively covers key strategies for survival in the AI era, emphasizing skills development, collaboration, continuous learning, and ethics.\n- Good Points:\n  - Clear categorization of essential areas: skills, learning, collaboration, ethics.\n  - Focus on both technical and soft skills to complement AI.\n  - Inclusion of ethical considerations highlights responsible AI use.\n- Areas for Improvement:\n  - Could specify more actionable steps within each category.\n  - Adding emphasis on adaptability to rapidly changing AI landscapes would enhance relevance.\n  - Consider incorporating the importance of policy and regulation awareness.",
      "anthropic": "- Overall Evaluation:\n  - The mindmap provides a comprehensive overview of key strategies to thrive in the era of emerging AI, covering adaptable skills, continuous learning, human-AI collaboration, and ethical use of AI.\n\n- Good Points:\n  - The mindmap identifies the importance of developing adaptable and specialized skills that complement AI capabilities.\n  - It recognizes the need for continuous learning and upskilling to stay relevant in the face of technological advancements.\n  - The mindmap emphasizes the value of human-AI collaboration and the need to maintain a strong human-centric network.\n  - It underscores the significance of establishing ethical guidelines and frameworks for responsible AI use.\n\n- Areas for Improvement:\n  - The mindmap could provide more specific examples or case studies to illustrate the proposed strategies.\n  - It could also explore the potential challenges and barriers individuals might face in implementing these strategies, and offer practical guidance on overcoming them.\n  - The mindmap could delve deeper into the role of government, industry, and educational institutions in supporting individuals in navigating the era of emerging AI.",
      "google": "- Overall Evaluation:\n  - The mindmap presents a solid, high-level overview of strategies for surviving the AI era, focusing on adaptation, learning, collaboration, and ethics. It provides a reasonable starting point for further exploration.\n- Good Points:\n  - Covers key areas: adaptable skills, continuous learning, human-AI collaboration, and ethical considerations.\n  - Provides actionable, albeit general, strategies within each area.\n  - Easy to understand and navigate.\n- Areas for Improvement:\n  - Lacks depth and concrete examples. More specific actionable steps would be beneficial.\n  - Doesn't address potential negative impacts of AI (e.g., job displacement) beyond the need to adapt.\n  - Could benefit from a section on leveraging AI for personal and professional growth beyond direct collaboration."
    }
  }
}

The record object contains the following information:

  • input:
    • theme: same as one in the input parameter.
    • ideas: same as one in the input parameter.
    • freedom: same as one in the input parameter.
    • language: same as one in the input parameter.
    • idea_generation: LLM information used for idea generation.
    • idea_reduction: LLM information used for idea reduction (if reduction = True)
    • mindmap: LLM information used for mindmap generation.
    • class_diagram: LLM information used for affinity diagram generation.
    • idea_evaluation: LLM information used for idea evaluation.
  • output:
    • elapsed_time: Elapsed time in seconds as list: (1) idea generation, (2) idea reduction, (3) mindmap and class diagram generation, (4) idea evaluation in this order. Mindmaps and class diagrams are generated in a single process, running simultaniously.
    • ideas: Ideas generatedy by LLM, given in dict.
    • idea_list: List of ideas. If reduction = False, this list is just a collection of ideas. If reduction = True, this list will be another list after the reduction process. This list is used for mindmap and affinity diagram generation.
    • mindmap: Mindmap for the idea list, given in Mermaid format.
    • class_diagram: Affinity diagram for the idea list, given in mermaid format.
    • evaluation: Evaluation of the generated ideas in dictionary format if multiple LLMs are used.

Note: In monju, the class diagram is used for affinity diagram expression.

There are 5 ideas generated by each LLM (15 ideas in total) to the theme, but 12 ideas are used for organization through the idea reduction.

Elapsed Time

On average, one brainstorming session takes about 60 seconds to complete by monju. It dpends on how many ideas to generate by each LLM.

Since v0.3.0, it may take longer due to the idea reduction process. But still 120 seconds shoube be longest.

Status

There are many calls of print in the step-by-step example. Each print shows a different status, which is useful to know progress.

Types of bs.status are as follows:

  • not_started: The brainstorming process has not started. Most of cases, this status is shown when the instance of Monju is created.
  • idea_generation: Generating ideas in progress or finished.
  • reducing: Idea reduction in progress or finished.
  • organizing: Organizing ideas in mindmap and affinity diagram in progress or finished.
  • idea_evaluation: Evaluating ideas in progress or finished.
  • verifying: Verifying if all the outputs are generated in progress or finished.
  • done: The brainstorming process is completed.
  • failed: The brainstorming process is failed at some step.

Supported LLM Providers

One of the most important features of Monju is to generate ideas from multiple LLMs.

Monju currently sets the following LLM providers as default for idea generation and evaluation:

  • OpenAI: gpt-4o-mini
  • Anthropic: claude-3-haiku-20240307
  • Google: gemini-1.5-flash

And OpenAI gpt-4o is set as default for idea reduction and organization of mindmap and class diagram.

Monju is capable of single or multiple LLMs for each step:

  • Generate ideas (multiple/single LLM)
  • Remove duplicate ideas (single LLM)
  • Organize ideas in mindmap and class diagram (single LLM)
  • Evaluate ideas (multiple/single LLM)

You can configure which providers and models to use for each step. Set arguments of LLM information in params dictionary by calling generate_ideas(**params), reduce_ideas(**params), organize_ideas(**params), and evaluate_ideas(**params).

This customization is not possible for the batch brainstorming.

Note that providers are not limited to those shown above. Also possible to user other providers like DeepSeek, MistralAI, Groq, Perplexity, Grok and so on, as possible as they are defined in LLMMaster class.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monju-0.3.3.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monju-0.3.3-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file monju-0.3.3.tar.gz.

File metadata

  • Download URL: monju-0.3.3.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for monju-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f032d67a1fda8c57b25a8a7ac041f7eb6a4e768bf2efe98606e43d53860e4390
MD5 5f32257a0f50c93a771633ad513f5d8f
BLAKE2b-256 3d295a8d7c5cd457e1e49ea235c3f984baaa4360f7bb9ded40ab52d4c20ceed6

See more details on using hashes here.

File details

Details for the file monju-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: monju-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for monju-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0f133cfa7c51c24b369cd50961aac2f92051500b6631999652bd49c54ac38c20
MD5 583f0b3348a40a6518f7906bd458ca85
BLAKE2b-256 406f56b3a992c619e2d1a1e59150ba0879875eb96d6951692268f1ba9d576ca5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page