@@ -170,7 +170,7 @@ describe("computeMMRScore", () => {
170170 expected : - 0.5 ,
171171 } ,
172172 { name : "lambda=0.5 mixed" , relevance : 0.8 , similarity : 0.6 , lambda : 0.5 , expected : 0.1 } ,
173- { name : "default lambda math" , relevance : 1.0 , similarity : 0.5 , lambda : 0.7 , expected : 0.55 } ,
173+ { name : "default lambda math" , relevance : 1 , similarity : 0.5 , lambda : 0.7 , expected : 0.55 } ,
174174 ] as const ;
175175
176176 for ( const testCase of cases ) {
@@ -214,7 +214,7 @@ describe("mmrRerank", () => {
214214
215215 describe ( "lambda edge cases" , ( ) => {
216216 const diverseItems : MMRItem [ ] = [
217- { id : "1" , score : 1.0 , content : "apple banana cherry" } ,
217+ { id : "1" , score : 1 , content : "apple banana cherry" } ,
218218 { id : "2" , score : 0.9 , content : "apple banana date" } ,
219219 { id : "3" , score : 0.8 , content : "elderberry fig grape" } ,
220220 ] ;
@@ -247,7 +247,7 @@ describe("mmrRerank", () => {
247247 describe ( "diversity behavior" , ( ) => {
248248 it ( "promotes diverse results over similar high-scoring ones" , ( ) => {
249249 const items : MMRItem [ ] = [
250- { id : "1" , score : 1.0 , content : "machine learning neural networks" } ,
250+ { id : "1" , score : 1 , content : "machine learning neural networks" } ,
251251 { id : "2" , score : 0.95 , content : "machine learning deep learning" } ,
252252 { id : "3" , score : 0.9 , content : "database systems sql queries" } ,
253253 { id : "4" , score : 0.85 , content : "machine learning algorithms" } ,
@@ -263,7 +263,7 @@ describe("mmrRerank", () => {
263263
264264 it ( "handles items with identical content" , ( ) => {
265265 const items : MMRItem [ ] = [
266- { id : "1" , score : 1.0 , content : "identical content" } ,
266+ { id : "1" , score : 1 , content : "identical content" } ,
267267 { id : "2" , score : 0.9 , content : "identical content" } ,
268268 { id : "3" , score : 0.8 , content : "different stuff" } ,
269269 ] ;
@@ -276,7 +276,7 @@ describe("mmrRerank", () => {
276276
277277 it ( "handles all identical content gracefully" , ( ) => {
278278 const items : MMRItem [ ] = [
279- { id : "1" , score : 1.0 , content : "same" } ,
279+ { id : "1" , score : 1 , content : "same" } ,
280280 { id : "2" , score : 0.9 , content : "same" } ,
281281 { id : "3" , score : 0.8 , content : "same" } ,
282282 ] ;
@@ -290,7 +290,7 @@ describe("mmrRerank", () => {
290290 describe ( "tie-breaking" , ( ) => {
291291 it ( "uses original score as tiebreaker" , ( ) => {
292292 const items : MMRItem [ ] = [
293- { id : "1" , score : 1.0 , content : "unique content one" } ,
293+ { id : "1" , score : 1 , content : "unique content one" } ,
294294 { id : "2" , score : 0.9 , content : "unique content two" } ,
295295 { id : "3" , score : 0.8 , content : "unique content three" } ,
296296 ] ;
@@ -327,7 +327,7 @@ describe("mmrRerank", () => {
327327 it ( "handles negative scores" , ( ) => {
328328 const items : MMRItem [ ] = [
329329 { id : "1" , score : - 0.5 , content : "hello world" } ,
330- { id : "2" , score : - 1.0 , content : "foo bar" } ,
330+ { id : "2" , score : - 1 , content : "foo bar" } ,
331331 ] ;
332332
333333 const result = mmrRerank ( items , { lambda : 0.7 } ) ;
@@ -395,7 +395,7 @@ describe("applyMMRToHybridResults", () => {
395395 path : "/a.ts" ,
396396 startLine : 1 ,
397397 endLine : 10 ,
398- score : 1.0 ,
398+ score : 1 ,
399399 snippet : "function add numbers together" ,
400400 source : "memory" ,
401401 } ,
0 commit comments