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 technical problem (works immediately — no setup needed)
triz-ai analyze "How to increase SiC MOSFET switching speed without increasing EMI"
# → Identifies contradiction, recommends TRIZ principles, finds related patents
#   with assignees, and generates concrete solution directions

# 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

# Discover candidate new engineering parameters
triz-ai evolve --parameters
triz-ai evolve --parameters --review

# View matrix statistics
triz-ai matrix stats

Commands

Command Description
analyze Full TRIZ pipeline: contradiction → matrix → hybrid patent search → solution directions
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

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/                # Static TRIZ JSON data files (principles, parameters, matrix)
  knowledge/           # 40 principles, 50 parameters, contradiction matrix
  engine/              # analyzer, classifier, generator, evaluator
  patents/             # SQLite + sqlite-vec store, ingestion pipeline
  evolution/           # Candidate principle & parameter discovery + review
  llm/                 # litellm wrapper with pydantic validation
tests/                 # 82 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  # smaller model for classification

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.7.0.tar.gz (223.6 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.7.0-py3-none-any.whl (57.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: triz_ai-0.7.0.tar.gz
  • Upload date:
  • Size: 223.6 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.7.0.tar.gz
Algorithm Hash digest
SHA256 424d7c8e6631b3f6d1e5f3915b50ceeb18f74f22d522e5bc33a8a3b651f4b24a
MD5 4ef03f6866f5c06441528e2ce2b3ced3
BLAKE2b-256 e734c0547a43be17345e758f444d6dece3d5ec95392b92c2608c0fb3602a046d

See more details on using hashes here.

Provenance

The following attestation bundles were made for triz_ai-0.7.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.7.0-py3-none-any.whl.

File metadata

  • Download URL: triz_ai-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 57.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.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17f6f3d7e9b9aab6d13496235910e9789a239c9ba2c531f2de1d715fe831f015
MD5 daa1dc602355c39705223f9ddd93313f
BLAKE2b-256 7e0287bb83e7d8009165a0704ae54345e44f0c114931ce554e1fb2035ca52950

See more details on using hashes here.

Provenance

The following attestation bundles were made for triz_ai-0.7.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