Nicolas Wyss
commited on
Commit
·
e4a0d67
1
Parent(s):
81de2bb
fix: changed the prompt to include the passage/context as well and moved the full prompt to scheduler.js file
Browse files- src/requestManager.js +1 -1
- src/scheduler.js +2 -1
src/requestManager.js
CHANGED
|
@@ -95,7 +95,7 @@ export class RequestManager {
|
|
| 95 |
const route = this._choose(job);
|
| 96 |
const service = this._getInferenceService(route);
|
| 97 |
|
| 98 |
-
const full_prompt =
|
| 99 |
|
| 100 |
let response, latencyMs; // response is object with .answer and .stats
|
| 101 |
try {
|
|
|
|
| 95 |
const route = this._choose(job);
|
| 96 |
const service = this._getInferenceService(route);
|
| 97 |
|
| 98 |
+
const full_prompt = job.prompt; // ensure string input
|
| 99 |
|
| 100 |
let response, latencyMs; // response is object with .answer and .stats
|
| 101 |
try {
|
src/scheduler.js
CHANGED
|
@@ -98,7 +98,8 @@ export class JobScheduler {
|
|
| 98 |
.then(data => {
|
| 99 |
this._dataset = data.split('\n').slice(1).map(line => {
|
| 100 |
const [question, answer, context] = line.split(',');
|
| 101 |
-
|
|
|
|
| 102 |
});
|
| 103 |
console.log(`✅ Dataset '${name}' loaded with ${this._dataset.length} items.`);
|
| 104 |
})
|
|
|
|
| 98 |
.then(data => {
|
| 99 |
this._dataset = data.split('\n').slice(1).map(line => {
|
| 100 |
const [question, answer, context] = line.split(',');
|
| 101 |
+
const full_prompt = `Passage: ${context} \n Question: ${question} \n Answer only with one word "true" or "false":`;
|
| 102 |
+
return {prompt: full_prompt, groundTruth: answer};
|
| 103 |
});
|
| 104 |
console.log(`✅ Dataset '${name}' loaded with ${this._dataset.length} items.`);
|
| 105 |
})
|