Back to Decisions

Use OpenAI GPT-4 with LangChain for AI features

Accepted
Mike Johnson2024-01-25
aiinfrastructurearchitecture
Context
Why this decision needed to be made

TaskFlow Pro requires AI capabilities for task suggestions and prioritization. Need to decide on the ML stack that balances capability, cost, and time-to-market.

Options Considered
Comparison of available options
OptionProsConsChosen
OpenAI API + LangChainSelected
  • Powerful models
  • Quick integration
  • Good for NLP tasks
  • Active community
  • API costs (~$0.03/1k tokens)
  • Latency (500ms-2s)
  • Data sent to third party
Self-hosted LLaMA 2
  • No API costs
  • Full data control
  • No rate limits
  • Infrastructure overhead
  • Lower quality than GPT-4
  • Needs ML expertise
—
AWS Bedrock
  • Multiple models
  • AWS integration
  • Enterprise support
  • Vendor lock-in
  • Complex pricing
  • Less flexible
—
Outcome
What was decided

OpenAI GPT-4 with LangChain for orchestration

Rationale
Why this option was chosen

Fastest path to market with proven model quality. Estimated cost of €500/month at 10k users is acceptable. Will evaluate self-hosting once we have usage data and can justify infrastructure investment.