Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1caab5b

Browse files
Improve context
1 parent be67fce commit 1caab5b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎RagDemo.java‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ public static void main(String[] args) throws JsonProcessingException {
2626

2727
System.out.println("Generating response...");
2828
var prompt = buildPrompt(input, context);
29-
System.out.println(prompt);
30-
//if(true) return;
3129
var response = getResponse(prompt);
3230
System.out.println(response);
3331
}
@@ -53,14 +51,14 @@ SELECT id, CONCAT(
5351
ROW_NUMBER() OVER (), ". ",
5452
product_name, " (",
5553
"Category: ", category_name, ", ", root_category_name,
56-
" - Price: €", initial_price,
54+
" - Price: €", final_price,
5755
" - Rating: ", rating,
58-
")."
56+
"). ", description, "."
5957
) AS product
6058
FROM products
6159
WHERE embedding IS NOT NULL
6260
ORDER BY VEC_DISTANCE_COSINE(embedding, VEC_FromText(JSON_EXTRACT(:response, '$.data[0].embedding')))
63-
LIMIT 5
61+
LIMIT 10
6462
""")
6563
.addParameter("response", response)
6664
.executeAndFetchTable();

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /