Skip to content

Commit acbaaf8

Browse files
Spycshchensuyue
andauthored
change searchqna prompt (#639)
* change prompt * debug * debug --------- Co-authored-by: chen, suyue <suyue.chen@intel.com>
1 parent 06cb308 commit acbaaf8

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

SearchQnA/tests/test_gmc_on_gaudi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ function validate_searchqa() {
3636
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
3737
echo "$CLIENT_POD"
3838
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}")
39-
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"What is the latest news? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
39+
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"How many gold medals does USA win in olympics 2024? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
4040
exit_code=$?
4141
if [ $exit_code -ne 0 ]; then
42-
echo "chatqna failed, please check the logs in ${LOG_PATH}!"
42+
echo "searchqna failed, please check the logs in ${LOG_PATH}!"
4343
exit 1
4444
fi
4545

SearchQnA/tests/test_gmc_on_xeon.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ function validate_searchqa() {
3636
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
3737
echo "$CLIENT_POD"
3838
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}")
39-
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"What is the latest news? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
39+
kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"How many gold medals does USA win in olympics 2024? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log
4040
exit_code=$?
4141
if [ $exit_code -ne 0 ]; then
42-
echo "chatqna failed, please check the logs in ${LOG_PATH}!"
42+
echo "searchqna failed, please check the logs in ${LOG_PATH}!"
4343
exit 1
4444
fi
4545

SearchQnA/tests/test_searchqna_on_gaudi.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,14 @@ function start_services() {
7373

7474

7575
function validate_megaservice() {
76-
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "What is the latest news? Give me also the source link", "stream": "False"}' -H 'Content-Type: application/json')
76+
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "How many gold medals does USA win in olympics 2024? Give me also the source link.", "stream": "False"}' -H 'Content-Type: application/json')
7777
echo $result
7878

79-
if [[ $result == *"news"* ]]; then
79+
if [[ $result == *"2024"* ]]; then
80+
docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log
81+
docker logs searchqna-gaudi-backend-server > ${LOG_PATH}/searchqna-gaudi-backend-server.log
82+
docker logs tei-embedding-gaudi-server > ${LOG_PATH}/tei-embedding-gaudi-server.log
83+
docker logs embedding-tei-server > ${LOG_PATH}/embedding-tei-server.log
8084
echo "Result correct."
8185
else
8286
docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log

SearchQnA/tests/test_searchqna_on_xeon.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ function start_services() {
7171

7272

7373
function validate_megaservice() {
74-
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "What is the latest news? Give me also the source link", "stream": "False"}' -H 'Content-Type: application/json')
74+
result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "How many gold medals does USA win in olympics 2024? Give me also the source link.", "stream": "False"}' -H 'Content-Type: application/json')
7575
echo $result
7676

77-
if [[ $result == *"news"* ]]; then
77+
if [[ $result == *"2024"* ]]; then
78+
docker logs web-retriever-chroma-server
79+
docker logs searchqna-xeon-backend-server
7880
echo "Result correct."
7981
else
8082
docker logs web-retriever-chroma-server

0 commit comments

Comments
 (0)