change searchqna prompt (#639)

* change prompt

* debug

* debug

---------

Co-authored-by: chen, suyue <suyue.chen@intel.com>
This commit is contained in:
Sihan Chen
2024-08-22 11:53:42 +08:00
committed by GitHub
parent 06cb308611
commit acbaaf8ff0
4 changed files with 14 additions and 8 deletions

View File

@@ -36,10 +36,10 @@ function validate_searchqa() {
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
echo "$CLIENT_POD"
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}")
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
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
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "chatqna failed, please check the logs in ${LOG_PATH}!"
echo "searchqna failed, please check the logs in ${LOG_PATH}!"
exit 1
fi

View File

@@ -36,10 +36,10 @@ function validate_searchqa() {
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
echo "$CLIENT_POD"
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}")
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
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
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "chatqna failed, please check the logs in ${LOG_PATH}!"
echo "searchqna failed, please check the logs in ${LOG_PATH}!"
exit 1
fi

View File

@@ -73,10 +73,14 @@ function start_services() {
function validate_megaservice() {
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')
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')
echo $result
if [[ $result == *"news"* ]]; then
if [[ $result == *"2024"* ]]; then
docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log
docker logs searchqna-gaudi-backend-server > ${LOG_PATH}/searchqna-gaudi-backend-server.log
docker logs tei-embedding-gaudi-server > ${LOG_PATH}/tei-embedding-gaudi-server.log
docker logs embedding-tei-server > ${LOG_PATH}/embedding-tei-server.log
echo "Result correct."
else
docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log

View File

@@ -71,10 +71,12 @@ function start_services() {
function validate_megaservice() {
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')
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')
echo $result
if [[ $result == *"news"* ]]; then
if [[ $result == *"2024"* ]]; then
docker logs web-retriever-chroma-server
docker logs searchqna-xeon-backend-server
echo "Result correct."
else
docker logs web-retriever-chroma-server