Good Practices
info
So far, Wren AI has been designed around OpenAI models. We understand that prompt customization for different models may be important to you. However, you currently cannot customize prompts in Wren AI, and some community members have already raised this feature request. You can follow the issue to get the latest status and share your feedback.
warning
After changing the configuration in ~/.wrenai/config.yaml, you need to restart Wren AI using the launcher and choose the "Custom" option to apply the changes.
- Set up Langfuse to trace the performance and issues of Wren AI.
- Start with the most powerful model you can afford, so you understand how far you can currently go with the model. If you are satisfied with the performance, you can stop there, or try weaker models if you want to save costs and improve latency.
- If you are using OpenAI models from the launcher, we will automatically skip the "column pruning" step. This can improve the latency of asking questions and also prevent losing any tables or columns you want to keep. If you are using other models, you can set the
allow_using_db_schemas_without_pruningparameter totruein~/.wrenai/config.yamlto achieve the same effect. However, this may feed many more tokens to the model and exceed the model's token limit. - If you would like to reduce the latency of asking questions further, you can try these methods in the
~/.wrenai/config.yamlfile: (Warning: This may affect the performance of asking questions.)- define
allow_intent_classification: falseto disable the intent classification step. - define
allow_sql_generation_reasoning: falseto disable the SQL generation reasoning step.
- define
- When you are indexing the MDL, if you have so many columns that they exceed the token limit of the model, you can try reducing the value of the
column_indexing_batch_sizeparameter. - By default, Wren AI retrieves the top 10 tables from the vector database. You can change the value of
table_retrieval_sizein~/.wrenai/config.yamlif needed.