test-cases.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import type { EvalTestCase } from './types.js';
  2. export const testCases: EvalTestCase[] = [
  3. // === searchNodes: Symbol Lookup Precision ===
  4. {
  5. id: 'search-class-exact',
  6. query: 'TransportService',
  7. api: 'searchNodes',
  8. expectedSymbols: ['TransportService'],
  9. kinds: ['class'],
  10. },
  11. {
  12. id: 'search-method-qualified',
  13. query: 'TransportService sendRequest',
  14. api: 'searchNodes',
  15. expectedSymbols: ['sendRequest'],
  16. kinds: ['method'],
  17. },
  18. {
  19. id: 'search-interface',
  20. query: 'ActionListener',
  21. api: 'searchNodes',
  22. expectedSymbols: ['ActionListener'],
  23. kinds: ['interface'],
  24. },
  25. {
  26. id: 'search-enum',
  27. query: 'RestStatus',
  28. api: 'searchNodes',
  29. expectedSymbols: ['RestStatus'],
  30. kinds: ['enum'],
  31. },
  32. {
  33. id: 'search-exception',
  34. query: 'SearchPhaseExecutionException',
  35. api: 'searchNodes',
  36. expectedSymbols: ['SearchPhaseExecutionException'],
  37. kinds: ['class'],
  38. },
  39. {
  40. id: 'search-nested-class',
  41. query: 'Engine Index',
  42. api: 'searchNodes',
  43. expectedSymbols: ['Index'],
  44. kinds: ['class'],
  45. },
  46. // === findRelevantContext: Exploration Quality ===
  47. {
  48. id: 'explore-rest-layer',
  49. query: 'How does the REST layer handle HTTP requests?',
  50. api: 'findRelevantContext',
  51. expectedSymbols: ['RestController', 'RestHandler', 'BaseRestHandler', 'RestRequest'],
  52. options: { searchLimit: 8, traversalDepth: 3, maxNodes: 80, minScore: 0.2 },
  53. },
  54. {
  55. id: 'explore-search-execution',
  56. query: 'How does search execution work from request to shard?',
  57. api: 'findRelevantContext',
  58. expectedSymbols: ['TransportSearchAction', 'AbstractSearchAsyncAction', 'QueryPhase', 'FetchPhase'],
  59. options: { searchLimit: 8, traversalDepth: 3, maxNodes: 80, minScore: 0.2 },
  60. },
  61. {
  62. id: 'explore-bulk-indexing',
  63. query: 'How does bulk indexing work?',
  64. api: 'findRelevantContext',
  65. expectedSymbols: ['TransportBulkAction', 'BulkRequest', 'BulkResponse'],
  66. options: { searchLimit: 8, traversalDepth: 3, maxNodes: 80, minScore: 0.2 },
  67. },
  68. {
  69. id: 'explore-shard-allocation',
  70. query: 'How does shard rebalancing and allocation work?',
  71. api: 'findRelevantContext',
  72. expectedSymbols: ['AllocationService', 'BalancedShardsAllocator'],
  73. options: { searchLimit: 8, traversalDepth: 3, maxNodes: 80, minScore: 0.2 },
  74. },
  75. {
  76. id: 'explore-transport-search',
  77. query: 'How does TransportService connect to SearchTransportService?',
  78. api: 'findRelevantContext',
  79. expectedSymbols: ['TransportService', 'SearchTransportService'],
  80. options: { searchLimit: 8, traversalDepth: 3, maxNodes: 80, minScore: 0.2 },
  81. },
  82. {
  83. id: 'explore-engine-implementations',
  84. query: 'What are the Engine implementations for indexing?',
  85. api: 'findRelevantContext',
  86. expectedSymbols: ['InternalEngine', 'ReadOnlyEngine', 'Engine'],
  87. options: { searchLimit: 8, traversalDepth: 3, maxNodes: 80, minScore: 0.2 },
  88. },
  89. ];