Skip to content

Discord Support

If you need help with Vanna, you can join our Discord server.

How to Ask Good Questions on Discord

When seeking help on Discord for Vanna AI, providing detailed and specific information can significantly speed up the resolution process. Here’s a guide on how to ask effective questions:

1. Provide Context

  • Describe the Problem: Clearly explain what you are trying to achieve and what issue you are encountering.
  • Environment Details: Mention the environment you are working in (e.g., Jupyter Notebook, Streamlit app, Flask app, etc.).

2. Include Configuration Details

  • Database Information: Specify the type of database you are using (e.g., PostgreSQL, Snowflake, DuckDB).
  • LLM and Vector Database: Mention the LLM (e.g., OpenAI, Anthropic) and vector database (e.g., ChromaDB, VannaDB) you are using.
  • Configuration Settings: Share any relevant configuration settings or parameters you have set.

3. Share Code Snippets

  • Initialization Code: Provide the code you used to initialize Vanna.
  • Training Code: Include any code related to training the model, such as DDL statements, documentation, or SQL queries.
  • Error Messages: If you encounter any errors, share the complete error message and the code that caused it.

4. Ask Specific Questions

  • Be Clear and Concise: Ask specific questions rather than vague ones. For example, instead of asking "Why is my query not working?", ask "Why am I getting a syntax error when running this specific query?"

5. Provide Examples

  • Sample Data: If possible, provide sample data that can help reproduce the issue.
  • Expected vs. Actual Results: Explain what you expected to happen and what actually happened.

6. Use Proper Formatting

  • Code Blocks: Use code blocks to format your code snippets. This makes it easier to read and understand.
  • Markdown: Utilize Markdown for better readability. For example, use bold for emphasis and italics for highlighting.

Example Question

Here’s an example of a well-structured question:

Context:

I am trying to generate a SQL query using Vanna in a Jupyter Notebook. I am using PostgreSQL as my database and OpenAI as my LLM.

Configuration:

from vanna.openai.openai_chat import OpenAI_Chat
from vanna.chromadb.chromadb_vector import ChromaDB_VectorStore

class MyVanna(ChromaDB_VectorStore, OpenAI_Chat):
    def __init__(self, config=None):
        ChromaDB_VectorStore.__init__(self, config=config)
        OpenAI_Chat.__init__(self, config=config)

vn = MyVanna(config={'api_key': 'sk-...', 'model': 'gpt-4-...'})

vn.train(ddl="""
    CREATE TABLE IF NOT EXISTS my_table (
        id INT PRIMARY KEY,
        name VARCHAR(100),
        age INT
    )
""")

Issue:

When I ask the following question, I get a syntax error:

vn.ask("What are the names of all customers older than 30?")

Error Message:

SyntaxError: syntax error at or near "WHERE"
LINE 1: SELECT name FROM my_table WHERE age > 30

Expected vs. Actual Results:

I expected to get a list of names of customers older than 30, but instead, I received a syntax error.

By following these guidelines, you can help us assist you more efficiently and effectively. Thank you for using Vanna AI!

Vanna Logo Vanna.AI

The fastest way to get insights from your database just by asking questions