Good Practices
info
By far, Wren AI is desigend using OpenAI models. We understand prompts customization for different models may be important to you. However, currently you couldn't customize prompts in Wren AI, and some community members already have raised this feature request. You can follow the issue to get the latest status and give your feedback here.
warning
After the configuration of ~/.wrenai/config.yaml is changed, you need to restart Wren AI using the launcher and choose the "Custom" option to apply the changes.
- Setup Langfuse to trace the performance and issues of Wren AI.
- Use the most powerful model you could afford first. So you could understand currently how far you could go with the model. If you are satisfied with the performance, you could stop there; or try to use weaker models if you want to save costs and improve latency.
- If you are using Open AI models from the launcher, we will automatically skip the "column pruning" step. This could improve the latency of the asking questions, and also prevent from losing any tables or columns you want to keep. If you are using other models, you could make the value of
allow_using_db_schemas_without_pruningparameter astruein~/.wrenai/config.yamlto achieve the same effect. However, this may feed a lot more tokens to the model and breaks the limitaion of token limit of the model. - If you would like to reduce the latency of the asking questions further, you could 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 your columns are too many so that they break the token limit of the model, you could try to reduce the size of
column_indexing_batch_sizeparameter to select the columns you want to use. - By default, Wren AI retrieves the top 10 tables from the vector database. You could change the value of
table_retrieval_sizein~/.wrenai/config.yamlif you need.