You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Integration_qa test (#375)
* Test IntegrationQA added
* update test cases
* update test
* update node count assertions
* test changes
* update changes
* modification test
* Code refatctor test cases
* Handle allowedlist issue in test
* test changes
* update test
* test case execution
* test chatbot updates
* test case update file
* added file
---------
* recent merges
* pdf deletion due to out of diskspace
* fixed status blank issue
* Rendering the file name instead of link for gcs and s3 sources in the info modal
* Convert is_cancelled value from string to bool
* added the default page size
* Issue fixed Processed chunked as 0 when file re-process again
* Youtube timestamps (#386)
* Wikipedia source to accept all valid urls
* wikipedia url to support multiple languages
* integrated wiki langauge param for extract api
* Youtube video timestamps
---------
* groq llm integration backend (#286)
* groq llm integration backend
* groq and description in node properties
* added groq in options
---------
* offset in chunks (#389)
* page number in gcs loader (#393)
* added youtube timestamps (#392)
* chat pop up button (#387)
* expand
* minimize-icon
* css changes
* chat history
* chatbot wider Side Nav
* expand icon
* chatbot UI
* Delete
* merge fixes
* code suggestions
---------
* chunks create before extraction using is_pre_process variable (#383)
* chunks create before extraction using is_pre_process variable
* Return total pages for Model
* update requirement.txt
* total pages on uplaod API
* added the Confirmation Dialog
* added the selected files into the confirmation modal
* format and lint fixes
* added the stop watch image
* fileselection on alert dialog
* Add timeout in docker for gunicorn workers
* Add cancel icon to info popup (#384)
* Info Modal Changes
* css changes
* recent merges
* Integration_qa test (#375)
* Test IntegrationQA added
* update test cases
* update test
* update node count assertions
* test changes
* update changes
* modification test
* Code refatctor test cases
* Handle allowedlist issue in test
* test changes
* update test
* test case execution
* test chatbot updates
* test case update file
* added file
---------
* fixed status blank issue
* Rendering the file name instead of link for gcs and s3 sources in the info modal
* added the default page size
* Convert is_cancelled value from string to bool
* Issue fixed Processed chunked as 0 when file re-process again
* Youtube timestamps (#386)
* Wikipedia source to accept all valid urls
* wikipedia url to support multiple languages
* integrated wiki langauge param for extract api
* Youtube video timestamps
---------
* groq llm integration backend (#286)
* groq llm integration backend
* groq and description in node properties
* added groq in options
---------
* Save Total Pages in DB
* Added total Pages
* file selection when we didn't select anything from Main table
* added the danger icon only for large files
* added the overflow for more files and file selection for all new files
* moved the interface to types
* added the icon accoroding to the source
* set total page for wiki and youtube
* h3 heading
* merge
* updated the alert on basis if total pages
* deleted chunks
* polling based on total pages
* isNan check
* large file based on file size for s3 and gcs
* file source in server side event
* time calculation based on chunks for gcs and s3
---------
* fixed the layout issue
* Populate graph schema (#399)
* crreate new endpoint populate_graph_schema and update the query for getting lables from DB
* Added main.py changes
* conditionally-including-the-gcs-login-flow-in-gcs-as-source (#396)
* added the condtion
* removed llms
* Fixed issue : Remove extra unused param
* get emb only if used (#278)
* Chatbot chunks (#402)
* Added file name to the content sent to LLM
* added chunk text in the response
* increased the docs parts sent to llm
* Modified graph query
* mardown rendering
* youtube starttime
* icons
* offset changes
* removed the files due to codespace space issue
---------
* Settings modal to support generating the labels from the llm by using text given by user (#405)
* added the json
* added schema from text dialog
* integrated the schemaAPI
* added the alert
* resize fixes
* fixed css issue
* fixed status blank issue
* Modified response when no docs is retrived (#413)
* Fixed env/docker-compose for local deployments + README doc (#410)
* Fixed env/docker-compose for local deployments + README doc
* wrong place for ENV in README
* by default, removed langsmith + fixed knn score string to float
* by default, removed langsmith + fixed knn score string to float
* Fixed strings in docker-compose env
* Added requirements (neo4j 5.15 or later, APOC, and instructions for Neo4j Desktop)
* Missed the TIME_PER_PAGE env, was causing NaN issue in the approx time processing notification. fixed that
* Support for all unstructured files (#401)
* all unstructured files
* responsiveness
* added file type
* added the extensions
* spell mistake
* ppt file changes
---------
* Settings modal to support generating the labels from the llm by using text given by user with checkbox (#415)
* added the json
* added schema from text dialog
* integrated the schemaAPI
* added the alert
* resize fixes
* Extract schema using direct ChatOpenAI API and Chain
* integrated the checkbox for schema to text dialog
* Update SettingModal.tsx
---------
* gcs file content read via storage client (#417)
* gcs file content read via storage client
* added the access token the file state
---------
* pypdf2 to read files from gcs (#420)
* 407 remove driver from frontend (#416)
* removed driver
* removed API
* connecting to database on page refresh
---------
* Css handling of info modal and Tooltips (#418)
* css change
* toolTips
* Sidebar Tooltips
* copy to clip
* css change
* added image types
* added gcs
* type fix
* docker changes
* speech
* added the toolip for dropzone sources
---------
* Fixed retrival bugs (#421)
* yarn format fixes
* changed the delete message
* added the cancel button
* changed the message on tooltip
* added space
* UI fixes
* tooltip for setting
* updated req
* wikipedia URL input (#424)
* accept only wikipedia links
* added wikipedia link
* added wikilink regex
* wikipedia single url only
* changed the alert message
* wording change
* pushed validation state persist error
---------
* speech and copy (#422)
* speech and copy
* startTime
* added chunk properties
* tooltips
---------
* Fixed issue for out of range in KNN API
* solved conflicts
* conflict solved
* Remove logging info from update KNN API
* tooltip changes
* format and lint fixes
* responsiveness changes
* Fixed issue for total pages GCS, S3
* UI polishing (#428)
* button and tooltip changes
* checking validation on change
* settings module populate fix
* format fixes
* opening the modal after auth success
* removed the limit
* added the scrobar for dropdowns
* speech state (#426)
* speech state
* Button Details changes
* delete wording change
* Total pages in buckets (#431)
* page number NA for buckets
* added N/A for gcs and s3 pages
* total pages for gcs
* remove unwanted logger
---------
* removed the max width
* Update FileTable.tsx
* Update the docker file
* Modified prompt (#438)
* Update Dockerfile
* Update Dockerfile
* Update Dockerfile
* rendering Fix
* Local file upload gcs (#442)
* Uplaod file to GCS
* GCS local upload fixed issue and delete file from GCS after processing and failed or cancelled
* Add life cycle rule on uploaded bucket
* pdf upload local and gcs bucket check
* delete files when processed and extract changes
---------
* Modified chat length and entities used (#443)
* metadata for unstructured files (#446)
* Unstructured file metadata (#447)
* metadata for unstructured files
* sleep in gcs upload
* updated
* icons added to chunks (#435)
* icons added to chunks
* info modal icons
---------
Co-authored-by: aashipandya <[email protected]>
Co-authored-by: abhishekkumar-27 <[email protected]>
Co-authored-by: kartikpersistent <[email protected]>
Co-authored-by: vasanthasaikalluri <[email protected]>
Co-authored-by: Prakriti Solankey <[email protected]>
Co-authored-by: Ajay Meena <[email protected]>
Co-authored-by: Morgan Senechal <[email protected]>
Co-authored-by: karanchellani <[email protected]>
Copy file name to clipboardExpand all lines: backend/src/QA_integration_new.py
+18-9Lines changed: 18 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@
33
33
MATCH (chunk)-[:PART_OF]->(d:Document)
34
34
CALL { WITH chunk
35
35
MATCH (chunk)-[:HAS_ENTITY]->(e)
36
-
MATCH path=(e)(()-[rels:!HAS_ENTITY&!PART_OF]-()){0,3}(:!Chunk&!Document)
36
+
MATCH path=(e)(()-[rels:!HAS_ENTITY&!PART_OF]-()){0,2}(:!Chunk&!Document)
37
37
UNWIND rels as r
38
38
RETURN collect(distinct r) as rels
39
39
}
@@ -45,22 +45,26 @@
45
45
apoc.text.join(texts,"\n----\n") +
46
46
apoc.text.join(entities,"\n")
47
47
as text, entities, chunkIds, page_numbers ,start_times
48
-
RETURN text, score, {source: COALESCE(CASE WHEN d.url CONTAINS "None" THEN d.fileName ELSE d.url END, d.fileName), chunkIds:chunkIds, page_numbers:page_numbers,start_times:start_times} as metadata
48
+
RETURN text, score, {source: COALESCE(CASE WHEN d.url CONTAINS "None" THEN d.fileName ELSE d.url END, d.fileName), chunkIds:chunkIds, page_numbers:page_numbers,start_times:start_times,entities:entities} as metadata
49
49
"""
50
50
51
51
SYSTEM_TEMPLATE="""
52
-
You are an AI-powered question-answering agent. Your task is to provide accurate and concise responses to user queries based on the given context, chat history, and available resources.
52
+
You are an AI-powered question-answering agent. Your task is to provide accurate and comprehensive responses to user queries based on the given context, chat history, and available resources.
53
53
54
54
### Response Guidelines:
55
-
1. **Direct Answers**: Provide straightforward answers to the user's queries without headers unless requested. Avoid speculative responses.
55
+
1. **Direct Answers**: Provide clear and thorough answers to the user's queries without headers unless requested. Avoid speculative responses.
56
56
2. **Utilize History and Context**: Leverage relevant information from previous interactions, the current user input, and the context provided below.
57
57
3. **No Greetings in Follow-ups**: Start with a greeting in initial interactions. Avoid greetings in subsequent responses unless there's a significant break or the chat restarts.
58
58
4. **Admit Unknowns**: Clearly state if an answer is unknown. Avoid making unsupported statements.
59
59
5. **Avoid Hallucination**: Only provide information based on the context provided. Do not invent information.
60
-
6. **Response Length**: Keep responses concise and relevant. Aim for clarity and completeness within 2-3 sentences unless more detail is requested.
60
+
6. **Response Length**: Keep responses concise and relevant. Aim for clarity and completeness within 4-5 sentences unless more detail is requested.
61
61
7. **Tone and Style**: Maintain a professional and informative tone. Be friendly and approachable.
62
62
8. **Error Handling**: If a query is ambiguous or unclear, ask for clarification rather than providing a potentially incorrect answer.
63
63
9. **Fallback Options**: If the required information is not available in the provided context, provide a polite and helpful response. Example: "I don't have that information right now." or "I'm sorry, but I don't have that information. Is there something else I can help with?"
64
+
10. **Context Availability**: If the context is empty, do not provide answers based solely on internal knowledge. Instead, respond appropriately by indicating the lack of information.
65
+
66
+
67
+
**IMPORTANT** : DO NOT ANSWER FROM YOUR KNOWLEDGE BASE USE THE BELOW CONTEXT
64
68
65
69
### Context:
66
70
<context>
@@ -72,15 +76,18 @@
72
76
AI Response: 'Hello there! How can I assist you today?'
73
77
74
78
User: "What is Langchain?"
75
-
AI Response: "Langchain is a framework that enables the development of applications powered by large language models, such as chatbots."
79
+
AI Response: "Langchain is a framework that enables the development of applications powered by large language models, such as chatbots. It simplifies the integration of language models into various applications by providing useful tools and components."
76
80
77
81
User: "Can you explain how to use memory management in Langchain?"
78
-
AI Response: "Langchain's memory management involves utilizing built-in mechanisms to manage conversational context effectively, ensuring a coherent user experience."
82
+
AI Response: "Langchain's memory management involves utilizing built-in mechanisms to manage conversational context effectively. It ensures that the conversation remains coherent and relevant by maintaining the history of interactions and using it to inform responses."
79
83
80
84
User: "I need help with PyCaret's classification model."
81
-
AI Response: "PyCaret simplifies the process of building and deploying machine learning models. For classification tasks, you can use PyCaret's setup function to prepare your data, then compare and tune models."
85
+
AI Response: "PyCaret simplifies the process of building and deploying machine learning models. For classification tasks, you can use PyCaret's setup function to prepare your data. After setup, you can compare multiple models to find the best one, and then fine-tune it for better performance."
86
+
87
+
User: "What can you tell me about the latest realtime trends in AI?"
88
+
AI Response: "I don't have that information right now. Is there something else I can help with?"
82
89
83
-
Note: This system does not generate answers based solely on internal knowledge. It answers from the information provided in the user's current and previous inputs, and from explicitly referenced external sources.
90
+
Note: This system does not generate answers based solely on internal knowledge. It answers from the information provided in the user's current and previous inputs, and from the context.
0 commit comments