Skip to main content

Synthesize (experimental)

--synthesize uses an LLM to generate missing descriptions for models and columns. Treat the output as a starting point and review everything before committing.

Supported providers

Set LLM_PROVIDER to one of:

  • openai
  • azure-openai
  • google-gemini
  • anthropic
  • lm-studio
  • ollama

Required environment variables

ProviderRequired variablesOptional variables
openaiOPENAI_API_KEYOPENAI_MODEL (default gpt-4o)
azure-openaiAZURE_OPENAI_BASE_URL, AZURE_OPENAI_API_KEY, AZURE_OPENAI_DEPLOYMENT_NAMEAZURE_OPENAI_API_VERSION (default 2025-01-01-preview)
google-geminiGOOGLE_GEMINI_API_KEYGOOGLE_GEMINI_BASE_URL, GOOGLE_GEMINI_MODEL
anthropicANTHROPIC_API_KEYANTHROPIC_BASE_URL, ANTHROPIC_MODEL
lm-studioLM_STUDIO_BASE_URL, LM_STUDIO_API_KEYLM_STUDIO_MODEL
ollamaOLLAMA_BASE_URL, OLLAMA_API_KEYOLLAMA_MODEL

Install dependencies

pip install "dbt-osmosis[openai]"

Test your configuration

dbt-osmosis test-llm

If the command succeeds, it prints the provider and model engine.

Run synthesis

dbt-osmosis yaml refactor --synthesize

You can also use --synthesize with dbt-osmosis yaml document.

Tips

  • Start with --dry-run to see what will change.
  • Use selection flags or positional selectors to limit scope while you build trust.