Spaces:
Paused
Paused
Update SmartQuery documentation and adjust audio settings
Browse files- Updated SmartQuery documentation to include new features and resources.
- Adjusted audio settings in smartquery/app.py for improved performance.
- chainlit.md +17 -3
- smartquery/app.py +3 -3
chainlit.md
CHANGED
@@ -30,17 +30,31 @@ This structure allows you to ask a wide range of questions about sales, customer
|
|
30 |
|
31 |
## How It Works π§
|
32 |
|
33 |
-
SmartQuery is an agentic application that leverages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
## The Tech Behind It π‘π€
|
36 |
|
37 |
SmartQuery is built using state-of-the-art technologies, including:
|
38 |
|
39 |
-
- **LangChain**: For
|
40 |
- **OpenAI GPT-4o**: For understanding and processing natural language queries.
|
41 |
- **FAISS**: For efficient similarity search and retrieval.
|
42 |
- **Chainlit**: For building interactive AI applications front-end.
|
43 |
-
- **Eleven Labs**: For speech-to-text
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
## Ready to Query?
|
46 |
|
|
|
30 |
|
31 |
## How It Works π§
|
32 |
|
33 |
+
SmartQuery is an agentic application that leverages GPT-4o to understand your queries in plain English and convert them into SQL queries to retrieve the desired information from the database. You can interact with SmartQuery via text or voice, making it incredibly versatile and user-friendly.
|
34 |
+
|
35 |
+
Key Features:
|
36 |
+
|
37 |
+
- Natural Language to SQL: Users can ask questions in plain English, and the application generates the corresponding SQL queries to fetch the required data from the database.
|
38 |
+
- Advanced Prompt Engineering: The application employs sophisticated prompt engineering techniques to accurately interpret user inputs and generate precise SQL queries.
|
39 |
+
- Few-shot Learning: Dynamically selected examples improve the accuracy and relevance of generated queries.
|
40 |
+
- Complex Queries: The application can handle intricate SQL operations, including JOINs and filters, to address complex user queries effectively.
|
41 |
+
- Proper Noun Correction Tool: Handles high-cardinality columns containing proper nouns (such as addresses, song names, or artists) by querying a vector store of known entities, ensuring accurate and relevant results (e.g., if you ask for Methalika titles, it will "understand" Metallica).
|
42 |
|
43 |
## The Tech Behind It π‘π€
|
44 |
|
45 |
SmartQuery is built using state-of-the-art technologies, including:
|
46 |
|
47 |
+
- **LangChain**: For LLM and agent orchestration.
|
48 |
- **OpenAI GPT-4o**: For understanding and processing natural language queries.
|
49 |
- **FAISS**: For efficient similarity search and retrieval.
|
50 |
- **Chainlit**: For building interactive AI applications front-end.
|
51 |
+
- **Eleven Labs**: For speech-to-text functionalities, enabling voice interactions.
|
52 |
+
|
53 |
+
## Links and Resources π
|
54 |
+
|
55 |
+
- Github Repository: https://github.com/JulsdL/SmartQuery
|
56 |
+
- LangChain documentation: https://python.langchain.com/v0.2/docs/tutorials/sql_qa/#execute-sql-query
|
57 |
+
- ChainLit documentation: https://docs.chainlit.io/get-started/overview
|
58 |
|
59 |
## Ready to Query?
|
60 |
|
smartquery/app.py
CHANGED
@@ -35,9 +35,9 @@ async def on_chat_start():
|
|
35 |
|
36 |
# Configure Chainlit features for audio capture
|
37 |
cl.user_session.set("audio_settings", {
|
38 |
-
"min_decibels": -
|
39 |
-
"initial_silence_timeout":
|
40 |
-
"silence_timeout":
|
41 |
"max_duration": 15000,
|
42 |
"chunk_duration": 1000,
|
43 |
"sample_rate": 44100
|
|
|
35 |
|
36 |
# Configure Chainlit features for audio capture
|
37 |
cl.user_session.set("audio_settings", {
|
38 |
+
"min_decibels": -20,
|
39 |
+
"initial_silence_timeout": 2000,
|
40 |
+
"silence_timeout": 3500,
|
41 |
"max_duration": 15000,
|
42 |
"chunk_duration": 1000,
|
43 |
"sample_rate": 44100
|