rails-llm-integration
by rubyonai
Production-grade LLM integration patterns for Ruby on Rails applications. USE THIS SKILL when the user needs to: integrate OpenAI, Claude, or any LLM API into a Rails app; use ruby_llm gem or langchain-rb gem in Rails; build AI-powered features in Rails; manage prompts as templates; route between LLM models for cost optimization; run LLM calls as background jobs; set up Braintrust evals; use LiteLLM or Portkey as a proxy; track LLM costs; test AI features; audit LLM usage patterns; build RAG pipelines in Rails with langchain-rb; add classification, summarization, extraction, or generation features to Rails; manage LLM API keys and budgets; handle LLM errors and retries; or adopt conventions for LLM service objects similar to ActionMailer or ActiveJob patterns. Triggers on: LLM in Rails, OpenAI Rails integration, Claude API Ruby, Anthropic SDK Rails, AI features Rails, prompt engineering Ruby, model routing, LLM cost optimization, Braintrust Rails, eval pipeline Ruby, background LLM jobs, async AI calls, LLM service objects, prompt templates Rails, ruby-openai gem, anthropic-rb gem, ruby-llm gem, ruby_llm gem, langchain-rb gem, langchainrb, faraday LLM, LLM anti-patterns Rails, audit LLM calls, AI service objects, Rails AI conventions, RAG Rails, vector search Rails, pgvector Rails.