Skip to main content

AI-Powered TRIZ Innovation Engine — combines TRIZ methodology with AI and real patent data

Project description

triz-ai

PyPI License Python Versions

AI-powered TRIZ innovation engine — analyze technical problems, classify patents, and discover new inventive principles.

What is this?

triz-ai combines TRIZ (Theory of Inventive Problem Solving) with AI and real patent data. It goes beyond static TRIZ tools by using AI to discover candidate new principles from modern patents, continuing Altshuller's original work.

  • Patent-grounded — every suggestion is backed by real patent evidence, with assignee and filing date
  • Hybrid search — finds relevant patents using both vector similarity and TRIZ principle/contradiction matching
  • Solution directions — generates concrete, actionable solution approaches, not just abstract principles
  • 50 engineering parameters — extends Altshuller's 39 with modern domains (security, sustainability, scalability, etc.)
  • Evolving principles & parameters — discovers candidate new principles and parameters from modern patents
  • Provider-agnostic — works with OpenRouter, Ollama, Anthropic, OpenAI, and 100+ providers via litellm
  • Zero infrastructure — local SQLite database with built-in vector search

Installation

pip install triz-ai

Or for development:

# Requires Python 3.12+ and uv
uv sync

Set up your LLM provider API key:

export OPENROUTER_API_KEY="your-key"

Or use a .env file: echo 'OPENROUTER_API_KEY=your-key' > .env

Quick Start

# Analyze a problem — auto-classifies and routes to the best TRIZ tool
triz-ai analyze "How to increase SiC MOSFET switching speed without increasing EMI"
# → Routes to: technical contradiction analysis

triz-ai analyze "The solder joint must be rigid for reliability but flexible for thermal cycling"
# → Routes to: physical contradiction analysis

triz-ai analyze "How to detect delamination without adding sensors"
# → Routes to: Su-Field analysis

triz-ai analyze "The adhesive layer damages the silicon die during thermal cycling"
# → Routes to: function analysis

triz-ai analyze "Reduce the BOM cost of this gate driver circuit"
# → Routes to: trimming analysis

triz-ai analyze "What is the next generation of SiC packaging technology?"
# → Routes to: trends analysis

# Force a specific method
triz-ai analyze "How to detect delamination" --method su-field

# For patent-backed examples, ingest patent data
triz-ai ingest data/patents/battery_patents.json

# Discover underused principles in a domain
triz-ai discover --domain "battery technology"

# Run evolution pipeline to find candidate new principles
triz-ai evolve
triz-ai evolve --review  # interactive accept/reject

# View matrix statistics
triz-ai matrix stats

Commands

Command Description
analyze Auto-routes to the best TRIZ tool (6 methods); --method to force one
discover Find underused principles in a domain and generate patent-grounded ideas
evolve Discover candidate new TRIZ principles (--parameters for parameters)
ingest Ingest and auto-classify patents from .txt, .pdf, or .json files
init Reset the patent database (only needed with --force)
matrix seed LLM-seed missing matrix cells for params 40-50 (power-user)
matrix stats Show matrix fill rate and patent observation statistics

Analysis Methods

Method When to use
technical-contradiction Improving X worsens Y
physical-contradiction A part must be both A and B
su-field Detection/measurement problems
function-analysis A component causes harm
trimming Simplify / reduce cost
trends Where is this technology going?

All commands support --format text|json|markdown and --model to override the LLM model.

Project Structure

src/triz_ai/
  cli.py              # Typer CLI entry point
  config.py            # Config loading (~/.triz-ai/config.yaml)
  data/                # TRIZ JSON data (principles, parameters, matrix, separation, solutions, trends)
  knowledge/           # Loaders for all TRIZ knowledge data
  engine/              # analyzer, router, 5 new pipelines, classifier, generator, evaluator
  patents/             # SQLite + sqlite-vec store, ingestion pipeline
  evolution/           # Candidate principle & parameter discovery + review
  llm/                 # litellm wrapper with pydantic validation
tests/                 # 124 unit tests

Configuration

Config lives at ~/.triz-ai/config.yaml:

llm:
  default_model: openrouter/nvidia/nemotron-3-super-120b-a12b:free
  classify_model: openrouter/nvidia/nemotron-3-nano-30b-a3b:free
  # router_model: null  # model for problem classification (defaults to classify_model)

embeddings:
  model: openrouter/nvidia/llama-nemotron-embed-vl-1b-v2:free
  dimensions: 768

database:
  path: ~/.triz-ai/patents.db

evolution:
  review_threshold: 0.7

Any litellm-supported model string works — just change the model and set the corresponding API key.

Using a custom LLM gateway (e.g., company litellm proxy)

llm:
  default_model: gpt-4o
  classify_model: gpt-4o-mini  # smaller/cheaper model for patent classification during ingest
  api_base: https://llm-proxy.internal/v1
  api_key: your-proxy-token

embeddings:
  model: text-embedding-3-small
  dimensions: 768
  api_base: https://llm-proxy.internal/v1
  api_key: your-proxy-token

You can also override the classify model per-command: triz-ai ingest data/ --classify-model gpt-4o-mini

Development

uv sync                              # Install dependencies
uv run pytest                        # Run tests
uv run pre-commit install            # Install git hooks
uv run pre-commit install --hook-type pre-push

License

MIT

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

triz_ai-0.8.0.tar.gz (247.0 kB view details)

Uploaded Source

Built Distribution

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

triz_ai-0.8.0-py3-none-any.whl (81.8 kB view details)

Uploaded Python 3

File details

Details for the file triz_ai-0.8.0.tar.gz.

File metadata

  • Download URL: triz_ai-0.8.0.tar.gz
  • Upload date:
  • Size: 247.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for triz_ai-0.8.0.tar.gz
Algorithm Hash digest
SHA256 e5f98deabfe69a8e557e0392790528fae86a911025a54fc61245c532437ac4f7
MD5 f0326d19489223e3feadb7c840a1448e
BLAKE2b-256 d1304609d93cda6fb3559ea3093105cbfaf8b018858c9466cf172f3162fbfb63

See more details on using hashes here.

Provenance

The following attestation bundles were made for triz_ai-0.8.0.tar.gz:

Publisher: ci-and-publish.yml on flyersworder/triz-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triz_ai-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: triz_ai-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 81.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for triz_ai-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd5cc9c56b36e0774d25694b1437bba3173c5eafc2f212d22a9592a13d297dc4
MD5 08b51bc1d08a83437973d19f42e4cf29
BLAKE2b-256 87a9a8a178f305cee377c1c8b129a3703818040e5a51fe836e1b564cc3334db7

See more details on using hashes here.

Provenance

The following attestation bundles were made for triz_ai-0.8.0-py3-none-any.whl:

Publisher: ci-and-publish.yml on flyersworder/triz-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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