From 55d287dfcf1d574adf3878dfd5a39f0ef82aeb91 Mon Sep 17 00:00:00 2001 From: Letong Han <106566639+letonghan@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:01:28 +0800 Subject: [PATCH] update readme to fix input length (#720) Signed-off-by: letonghan --- ChatQnA/benchmark/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/ChatQnA/benchmark/README.md b/ChatQnA/benchmark/README.md index 549c65b09..a9482b118 100644 --- a/ChatQnA/benchmark/README.md +++ b/ChatQnA/benchmark/README.md @@ -143,6 +143,34 @@ kubectl apply -f . #### 3. Run tests +##### 3.1 Upload Retrieval File + +Before running tests, upload a specified file to make sure the llm input have the token length of 1k. + +Run the following command to check the cluster ip of dataprep. + +```bash +kubectl get svc +``` + +Substitute the `${cluster_ip}` into the real cluster ip of dataprep microservice as below. + +```log +dataprep-svc ClusterIP xx.xx.xx.xx 6007/TCP 5m app=dataprep-deploy +``` + +Run the cURL command to upload file: + +```bash +cd GenAIEval/evals/benchmark/data +curl -X POST "http://${cluster_ip}:6007/v1/dataprep" \ + -H "Content-Type: multipart/form-data" \ + -F "files=@./upload_file.txt" \ + -F "chunk_size=3800" +``` + +##### 3.2 Run Benchmark Test + We copy the configuration file [benchmark.yaml](./benchmark.yaml) to `GenAIEval/evals/benchmark/benchmark.yaml` and config `test_suite_config.user_queries` and `test_suite_config.test_output_dir`. ```bash