Skip to main content

Convert raw human intent into structured prompts, optionally enhanced using Google Gemini.

Project description

📌 intent2prompt

intent2prompt converts natural, incomplete user instructions into structured, context-aware prompts that are ready for any LLM.
It understands the user’s intention, identifies the task type, and transforms vague commands into well-defined prompts.
Optionally, it can refine and improve the output using Google Gemini.


🚀 Why intent2prompt?

AI responses are only as good as the prompts they receive. Users often type:

email boss leave tomorrow
sql sales last month region west
ppt on ai future

These are not prompts — they are intentions.
This library converts those intentions into prompts that models actually understand.


✨ Core Capabilities

✔️ Detects the nature of the task automatically
(email, SQL query, PPT outline, explanation, summary, or generic instructions)

✔️ Generates structured prompts including:

  • Tone
  • Output format
  • Expected response style
  • Additional constraints

✔️ Provides optional Gemini enhancement for:

  • Better clarity
  • Professional tone
  • Domain-aware restructuring
  • Expandable context

✔️ Works with one-line API calls: convert() for offline use, enhance() for Gemini integration


📦 Installation

pip install intent2prompt

🛠️ Usage

1️⃣ Convert intent into a structured prompt (offline)

from intent2prompt import convert

prompt = convert("email boss leave for 2 days", tone="formal")
print(prompt)

2️⃣ Enhance the prompt using Gemini

from intent2prompt import enhance, set_gemini_key

set_gemini_key("YOUR_GEMINI_API_KEY")
print(enhance("email boss leave for 2 days", tone="formal"))

🧪 Example

Input

email boss leave for 2 days

convert() output

You are an AI assistant.
Use a formal tone. Write a complete email with greeting, body, and closing.

User intention:
"email boss leave for 2 days"

Generate a complete response that satisfies this intention.

enhance() output (Gemini)

Draft a professional email requesting a two-day leave from your manager.
Specify dates, provide a brief reason, and include a polite closing line.

🔍 Where to Use intent2prompt

  • AI chatbots and assistants
  • Customer support systems
  • Email automation workflows
  • HR or employee request assistants
  • SQL prompt builders for BI tools
  • Documentation and training bots
  • Agentic AI pipelines where user input is raw

If your users type intent, this library gives you the prompt.


🧭 Future Scope

The library is designed with expansion in mind:

🚧 v0.2.0 planned features

  • Support for OpenAI, Claude, and Perplexity models
  • Domain-specific prompt packs:
    • HR communication
    • Finance & accounting workflows
    • Power BI reporting prompts
    • Restaurant & delivery ecosystem prompts
  • Multi-language prompt generation
  • Automatic tone detection
  • Command Line Interface: i2p "email boss leave"

🚀 Long-term vision Make intent2prompt the foundational layer for every agentic AI system —
where users simply express intent, and the system generates the best possible prompt.


👤 Author

Rajdeep Rao


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

intent2prompt-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

intent2prompt-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file intent2prompt-0.1.1.tar.gz.

File metadata

  • Download URL: intent2prompt-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for intent2prompt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b60ed8073ae30d8a5b6bc72ad036412f51cea46d25732699ab993447b87efe56
MD5 64ab7da39910c51a7d5b84312e28e57a
BLAKE2b-256 e76ab9b8d2ec54a445a4adb1d4a1cc18cfbb4e364153066a6e63983d1904f300

See more details on using hashes here.

File details

Details for the file intent2prompt-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: intent2prompt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for intent2prompt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7ad81cadf2596d15a54dd8e862bf9886f2a07422d3cfc174cf4f1aa6b6aa3b8
MD5 e9f3486e58b148f818d0f46ddfb0d2b9
BLAKE2b-256 92fb88f18cbd53995a2f00f5fe0870642c33dd571f85b20893b41b1f362e24b2

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