File size: 33,677 Bytes
f43f2d3
 
 
 
 
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
043003f
f43f2d3
 
 
83ba6f2
f43f2d3
 
043003f
f43f2d3
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
 
 
83ba6f2
f43f2d3
 
 
 
83ba6f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c934aa2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f43f2d3
 
 
83ba6f2
 
 
f43f2d3
83ba6f2
f43f2d3
83ba6f2
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
"""
Stores the detailed metadata for the Solr index fields.

This information is crucial for the LLM to understand the data schema,
enabling it to construct accurate and efficient Solr queries. Separating it
into its own module keeps the main application logic cleaner.
"""

field_metadata = [
    {
        "core_name": "news",
        "field_name": "business_model",
        "type": "string (categorical)",
        "example_values": ["pharma/bio", "drug delivery", "pharma services"],
        "definition": "The primary business category of the company involved in the news. Use for filtering by high-level industry segments."
    },
    {
        "core_name": "news",
        "field_name": "news_type",
        "type": "string (categorical)",
        "example_values": ["financial news", "product news", "other company news", "regulatory news", "people news", "funding news", "pharma services deals", "product approvals", "product deals", "technology news", "company acquisitions", "product filings", "legal news", "discovery technology deals", "company divestitures", "latest dds patents", "dd technology deals", "product acquisitions", "option agreement", "joint venture deal", "technology acquisitions"],
        "definition": "The category of the news article itself (e.g., financial, regulatory, acquisition). Use for filtering by the type of event being reported."
    },
    {
        "core_name": "news",
        "field_name": "event_type",
        "type": "string (categorical)",
        "example_values": ["phase 1", "phase 2", "pre clinical", "phase 3", "marketed", "approved", "registration", "research", "phase 0", "tentative approval", "bioequivalency", "undisclosed", "approvable"],
        "definition": "The clinical or developmental stage of a product or event discussed in the article. Essential for queries about clinical trial phases."
    },
    {
        "core_name": "news",
        "field_name": "source",
        "type": "string (categorical)",
        "example_values": ["Press Release", "PR Newswire", "Business Wire"],
        "definition": "The original source of the news article, such as a newswire or official report."
    },
    {
        "core_name": "news",
        "field_name": "company_name",
        "type": "string (exact match, for faceting)",
        "example_values": ["pfizer inc.", "astrazeneca plc", "roche"],
        "definition": "The canonical, standardized name of a company. **Crucially, you MUST use this field for `terms` faceting** to group results by a unique company. Do NOT use this for searching."
    },
    {
        "core_name": "news",
        "field_name": "company_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["pfizer inc.", "roche", "f. hoffmann-la roche ag", "nih"],
        "definition": "A field containing all known names and synonyms for a company. **You MUST use this field for all `query` parameter searches involving a company name** to ensure comprehensive results. Do NOT use for `terms` faceting."
    },
    {
        "core_name": "news",
        "field_name": "territory_hq_s",
        "type": "string (multi-valued, hierarchical)",
        "example_values": ["united states of america", "europe", "europe western"],
        "definition": "The geographic location (country and continent) of a company's headquarters. It is hierarchical. Use for filtering by location."
    },
    {
        "core_name": "news",
        "field_name": "therapeutic_category",
        "type": "string (specific)",
        "example_values": ["cancer, other", "cancer, nsclc metastatic", "alzheimer's"],
        "definition": "The specific disease or therapeutic area being targeted. Use for very specific disease queries."
    },
    {
        "core_name": "news",
        "field_name": "therapeutic_category_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["cancer", "oncology", "infections", "cns"],
        "definition": "Broader, multi-valued therapeutic categories and their synonyms. **Use this field for broad category searches** in the `query` parameter."
    },
    {
        "core_name": "news",
        "field_name": "compound_name",
        "type": "string (exact match, for faceting)",
        "example_values": ["opdivo injection solution", "keytruda injection solution"],
        "definition": "The specific, full trade name of a drug. **Use this field for `terms` faceting** on compounds."
    },
    {
        "core_name": "news",
        "field_name": "compound_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["nivolumab injection solution", "opdivo injection solution", "ono-4538 injection solution"],
        "definition": "A field with all known trade names and synonyms for a drug. **Use this field for all `query` parameter searches** involving a compound name."
    },
    {
        "core_name": "news",
        "field_name": "molecule_name",
        "type": "string (exact match, for faceting)",
        "example_values": ["cannabidiol", "paclitaxel", "pembrolizumab"],
        "definition": "The generic, non-proprietary name of the active molecule. **Use this field for `terms` faceting** on molecules."
    },
    {
        "core_name": "news",
        "field_name": "molecule_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["cbd", "s1-220", "a1002n5s"],
        "definition": "A field with all known generic names and synonyms for a molecule. **Use this field for all `query` parameter searches** involving a molecule name."
    },
    {
        "core_name": "news",
        "field_name": "highest_phase",
        "type": "string (categorical)",
        "example_values": ["marketed", "phase 2", "phase 1"],
        "definition": "The highest stage of development a drug has ever reached."
    },
    {
        "core_name": "news",
        "field_name": "drug_delivery_branch_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["injection", "parenteral", "oral", "injection, other", "oral, other"],
        "definition": "The method of drug administration. **Use this for `query` parameter searches about route of administration** as it contains broader, search-friendly terms."
    },
    {
        "core_name": "news",
        "field_name": "drug_delivery_branch",
        "type": "string (categorical, specific, for faceting)",
        "example_values": ["injection, other", "prefilled syringes", "np liposome", "oral enteric/delayed release"],
        "definition": "The most specific category of drug delivery technology. **Use this field for `terms` faceting** on specific delivery technologies."
    },
    {
        "core_name": "news",
        "field_name": "route_branch",
        "type": "string (categorical)",
        "example_values": ["injection", "oral", "topical", "inhalation"],
        "definition": "The primary route of drug administration. Good for faceting on exact routes."
    },
    {
        "core_name": "news",
        "field_name": "molecule_api_group",
        "type": "string (categorical)",
        "example_values": ["small molecules", "biologics", "nucleic acids"],
        "definition": "High-level classification of the drug's molecular type."
    },
    {
        "core_name": "news",
        "field_name": "content",
        "type": "text (full-text search)",
        "example_values": ["The largest study to date...", "balstilimab..."],
        "definition": "The full text content of the news article. Use for keyword searches on topics not covered by other specific fields."
    },
    {
        "core_name": "news",
        "field_name": "date",
        "type": "date",
        "example_values": ["2020-10-22T00:00:00Z"],
        "definition": "The full publication date and time in ISO 8601 format. Use for precise date range queries."
    },
    {
        "core_name": "news",
        "field_name": "date_year",
        "type": "number (year)",
        "example_values": [2020, 2021, 2022],
        "definition": "The 4-digit year of publication. **Use this for queries involving whole years** (e.g., 'in 2023', 'last year', 'since 2020')."
    },
    {
        "core_name": "news",
        "field_name": "total_deal_value_in_million",
        "type": "number (metric)",
        "example_values": [50, 120.5, 176.157, 1000],
        "definition": "The total value of a financial deal, in millions of USD. This is the primary numeric field for financial aggregations (sum, avg, etc.). To use this, you must also filter for news that has a deal value, e.g., 'total_deal_value_in_million:[0 TO *]'."
    },
    
    # NEW 'deal' CORE METADATA
    {
        "core_name": "deal",
        "field_name": "id",
        "type": "string",
        "example_values": ["275302", "275306", "275307"],
        "definition": "Unique identifier for the deal document."
    },
    {
        "core_name": "deal",
        "field_name": "date",
        "type": "date",
        "example_values": ["2018-01-08T00:00:00Z"],
        "definition": "The full publication date and time of the deal in ISO 8601 format. Use for precise date range queries."
    },
    {
        "core_name": "deal",
        "field_name": "date_year",
        "type": "number (year)",
        "example_values": [2018, 2017, 2016],
        "definition": "The 4-digit year of the deal. Use for queries involving whole years."
    },
    {
        "core_name": "deal",
        "field_name": "type",
        "type": "string (multi-valued, categorical)",
        "example_values": ["drug delivery", "medical device", "pharma/bio", "pharma services"],
        "definition": "The primary business categories associated with the deal (e.g., drug delivery, pharma/bio). Use for filtering by high-level industry segments."
    },
    {
        "core_name": "deal",
        "field_name": "news_branch",
        "type": "string (categorical)",
        "example_values": ["DD Technology Deals", "Company Acquisitions", "Product Deals", "Pharma Services Deals", "Discovery Technology Deals"],
        "definition": "The category of the deal itself (e.g., technology deal, acquisition). Use for filtering by the type of deal."
    },
    {
        "core_name": "deal",
        "field_name": "news_header",
        "type": "text",
        "example_values": ["Intec Pharma Announces Development Collaboration With Global Pharmaceutical Company", "Alcyone Lifesciences Announces Research Collaboration..."],
        "definition": "The headline or title of the news article announcing the deal. Use for keyword searches on the deal's title."
    },
    {
        "core_name": "deal",
        "field_name": "total_deal_value_in_million",
        "type": "number (metric)",
        "example_values": [68.9968, 260.0, 100.0, 12.0],
        "definition": "The total value of a financial deal, in millions of USD. This is the primary numeric field for financial aggregations (sum, avg, etc.)."
    },
    {
        "core_name": "deal",
        "field_name": "deal_upfront",
        "type": "number (metric)",
        "example_values": [23.6042, 80.0, 12.0],
        "definition": "The upfront payment value of the deal, in millions of USD."
    },
    {
        "core_name": "deal",
        "field_name": "milestones",
        "type": "number (metric)",
        "example_values": [120.0],
        "definition": "The value of milestone payments associated with the deal, in millions of USD."
    },
    {
        "core_name": "deal",
        "field_name": "company_name",
        "type": "string (exact match, for faceting, multi-valued)",
        "example_values": ["Novartis AG", "Intec Pharma Ltd.", "Guerbet SA", "REGENXBIO, Inc."],
        "definition": "The canonical, standardized names of companies involved in the deal. **Crucially, you MUST use this field for `terms` faceting** to group results by unique companies."
    },
    {
        "core_name": "deal",
        "field_name": "company_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["Novartis AG", "Intec Pharma Ltd.", "Orly Guy Ltd.", "AveXis, Inc."],
        "definition": "A field containing all known names and synonyms for companies in a deal. **You MUST use this field for all `query` parameter searches involving a company name**."
    },
    {
        "core_name": "deal",
        "field_name": "company_name_investor",
        "type": "string (multi-valued, for faceting)",
        "example_values": ["Novartis AG", "Undisclosed Co.", "Merck KGaA", "Surface Oncology, Inc."],
        "definition": "The canonical name(s) of the investor or acquiring company in the deal. Use for faceting on investors."
    },
    {
        "core_name": "deal",
        "field_name": "company_name_investor_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["Novartis AG", "Undisclosed Co.", "AveXis, Inc.", "Surface Oncology, Inc."],
        "definition": "A field with all known names and synonyms for the investor company. **Use this field for `query` parameter searches for investors.**"
    },
    {
        "core_name": "deal",
        "field_name": "company_name_invested",
        "type": "string (multi-valued, for faceting)",
        "example_values": ["Intec Pharma Ltd.", "Alcyone Therapeutics, Inc.", "Juniper Pharmaceuticals, Inc.", "Vaccinex, Inc."],
        "definition": "The canonical name(s) of the company receiving investment or being acquired. Use for faceting on investees."
    },
    {
        "core_name": "deal",
        "field_name": "company_name_invested_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["Intec Pharma Ltd.", "Orly Guy Ltd.", "Alcyone Lifesciences, Inc.", "Vaccinex, Inc."],
        "definition": "A field with all known names and synonyms for the company receiving investment. **Use this field for `query` parameter searches for investees.**"
    },
    {
        "core_name": "deal",
        "field_name": "territory_name",
        "type": "string (multi-valued, hierarchical)",
        "example_values": ["Israel", "Asia Middle East", "Switzerland", "Europe Western", "United States of America"],
        "definition": "The geographic locations (country, continent) of the companies involved in the deal. It is hierarchical. Use for filtering by location."
    },
    {
        "core_name": "deal",
        "field_name": "therapeutic_category",
        "type": "string (multi-valued, specific)",
        "example_values": ["Duodenal Ulcer", "CNS, Other", "Infertility, Other", "Spinal Muscular Atrophy, Other"],
        "definition": "The specific disease or therapeutic area being targeted by the deal. Use for very specific disease queries."
    },
    {
        "core_name": "deal",
        "field_name": "therapeutic_category_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["gastrointestinal diseases", "peptic ulcer", "cns", "central nervous system", "musculoskeletal diseases"],
        "definition": "Broader, multi-valued therapeutic categories and their synonyms related to the deal. **Use this field for broad category searches** in the `query` parameter."
    },
    {
        "core_name": "deal",
        "field_name": "drug_delivery_branch",
        "type": "string (multi-valued, for faceting)",
        "example_values": ["Gastro Retentive", "Catheter Delivery Systems", "Bioadhesion", "Adeno-Associated Virus Vectors"],
        "definition": "Specific categories of drug delivery technology involved in the deal. **Use this field for `terms` faceting** on specific delivery technologies."
    },
    {
        "core_name": "deal",
        "field_name": "drug_delivery_branch_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["oral", "oral modified release", "gastro retentive", "medical devices", "viral vectors"],
        "definition": "The method of drug administration and its broader search-friendly terms. **Use this for `query` parameter searches about route of administration**."
    },
    {
        "core_name": "deal",
        "field_name": "route_branch",
        "type": "string (multi-valued, categorical)",
        "example_values": ["ORAL", "INJECTION", "SURGICAL INSERTION", "VAGINAL"],
        "definition": "The primary route of drug administration related to the deal. Good for faceting on exact routes."
    },
    {
        "core_name": "deal",
        "field_name": "product_name",
        "type": "string (multi-valued, for searching and faceting)",
        "example_values": ["Accordion Oral Capsule, Intec/Novartis", "Zolgensma Injection Suspension", "Crinone Vaginal Gel"],
        "definition": "The name(s) of the product(s) central to the deal. Can be used for searching and faceting."
    },
    {
        "core_name": "deal",
        "field_name": "phase",
        "type": "string (multi-valued, categorical)",
        "example_values": ["Phase 1", "Research", "Marketed", "Phase 3", "Pre Clinical"],
        "definition": "The clinical or developmental stage(s) of a product or event discussed in the deal. Essential for queries about clinical trial phases."
    },
    {
        "core_name": "deal",
        "field_name": "highest_phase",
        "type": "string (multi-valued, categorical)",
        "example_values": ["Phase 1", "Research", "Marketed", "Phase 3"],
        "definition": "The highest stage of development a drug involved in the deal has ever reached."
    },
    {
        "core_name": "deal",
        "field_name": "technology",
        "type": "string (multi-valued, for searching and faceting)",
        "example_values": ["Accordion GR Pill", "Alcyone Pulsar", "NAV Vectors", "Qb VLP Platform"],
        "definition": "The specific named technologies that are part of the deal (e.g., a platform or a device)."
    },
    {
        "core_name": "deal",
        "field_name": "mechanism_type_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["antiulcerative agents", "cns modulators", "hormone related", "progestogens", "gene replacements"],
        "definition": "A field with all known mechanisms of action and their synonyms. **Use this field for all `query` parameter searches** involving mechanism of action."
    },
    {
        "core_name": "deal",
        "field_name": "molecule_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["Accordion Pill Program Oral Capsule, Intec/Novartis", "progesterone", "onasemnogene abeparvovec-xioi", "apabetalone"],
        "definition": "A field with all known generic names and synonyms for a molecule involved in the deal. **Use this field for all `query` parameter searches** involving a molecule name."
    },
    {
        "core_name": "deal",
        "field_name": "molecule_api_group",
        "type": "string (multi-valued, categorical)",
        "example_values": ["Small Molecules", "Biologics", "Nucleic Acids", "Peptides"],
        "definition": "High-level classification of the drug's molecular type involved in the deal."
    },
    {
        "core_name": "compound",
        "field_name": "id",
        "type": "string",
        "example_values": ["519-571", "35518_child"],
        "definition": "Unique identifier for the compound document."
    },
    {
        "core_name": "compound",
        "field_name": "molecule_id",
        "type": "string",
        "example_values": ["mol_12345", "mol_67890"], # Placeholder, not in provided doc examples directly.
        "definition": "Unique identifier for the molecule associated with the compound."
    },
    {
        "core_name": "compound",
        "field_name": "product_name",
        "type": "string (exact match, for faceting)",
        "example_values": ["Toprol-XL Tablets"],
        "definition": "The specific, full trade name of the product. **Use this field for `terms` faceting** on products."
    },
    {
        "core_name": "compound",
        "field_name": "product_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["Toprol-XL Tablets", "Toprol Extended Release Tablets"],
        "definition": "A field containing all known trade names and synonyms for a product. **Use this field for all `query` parameter searches involving a product name** to ensure comprehensive results."
    },
    {
        "core_name": "compound",
        "field_name": "product_synonym",
        "type": "string (multi-valued)",
        "example_values": ["Toprol Extended Release Tablets", "metoprolol succinate ER Tablets"],
        "definition": "Synonyms or alternative names for the product."
    },
    {
        "core_name": "compound",
        "field_name": "molecule_name",
        "type": "string (exact match, for faceting)",
        "example_values": ["metoprolol succinate"],
        "definition": "The generic, non-proprietary name of the active molecule. **Use this field for `terms` faceting** on molecules."
    },
    {
        "core_name": "compound",
        "field_name": "molecule_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["metoprolol succinate", "Métoprolol, Succinate de"],
        "definition": "A field with all known generic names and synonyms for a molecule. **Use this field for all `query` parameter searches** involving a molecule name."
    },
    {
        "core_name": "compound",
        "field_name": "molecule_synonym",
        "type": "string (multi-valued)",
        "example_values": ["Métoprolol, Succinate de", "Metoprololi Succinas"],
        "definition": "Synonyms or alternative names for the molecule."
    },
    {
        "core_name": "compound",
        "field_name": "molecule_type",
        "type": "string (categorical)",
        "example_values": ["small molecule", "biologic", "nucleic acid"],
        "definition": "High-level classification of the compound's molecular type."
    },
    {
        "core_name": "compound",
        "field_name": "company_name",
        "type": "string (multi-valued, exact match, for faceting)",
        "example_values": ["AstraZeneca Plc", "Recordati S.p.A."],
        "definition": "The canonical, standardized names of companies associated with the compound. **Use this field for `terms` faceting** to group results by unique companies."
    },
    {
        "core_name": "compound",
        "field_name": "company_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["AstraZeneca Plc", "New American Therapeutics, Inc."],
        "definition": "A field containing all known names and synonyms for companies associated with the compound. **Use this field for all `query` parameter searches involving a company name**."
    },
    {
        "core_name": "compound",
        "field_name": "company_role",
        "type": "string (multi-valued, categorical)",
        "example_values": ["owner", "partner", "manufacturer"],
        "definition": "The role of the company in relation to the compound (e.g., owner, partner, manufacturer)."
    },
    {
        "core_name": "compound",
        "field_name": "owner_company_name",
        "type": "string (multi-valued, exact match, for faceting)",
        "example_values": ["AstraZeneca Plc"], # Placeholder, based on common patterns
        "definition": "The canonical, standardized name(s) of the owner company of the compound. Use for faceting on owner companies."
    },
    {
        "core_name": "compound",
        "field_name": "overall_status",
        "type": "string (multi-valued, categorical)",
        "example_values": ["Marketed", "Completed", "Terminated"],
        "definition": "The overall development status of the compound (e.g., Marketed, Completed, Terminated)."
    },
    {
        "core_name": "compound",
        "field_name": "phase",
        "type": "string (multi-valued, categorical)",
        "example_values": ["Marketed", "Phase 1", "Pre Clinical"],
        "definition": "The current or most advanced clinical or developmental stage of the compound. Essential for queries about clinical trial phases."
    },
    {
        "core_name": "compound",
        "field_name": "highest_phase_molecule",
        "type": "string (multi-valued, categorical)",
        "example_values": ["Marketed", "Phase 3"],
        "definition": "The highest development stage a molecule associated with this compound has ever reached."
    },
    {
        "core_name": "compound",
        "field_name": "therapeutic_category",
        "type": "string (multi-valued, specific, for faceting)",
        "example_values": ["Angina Pectoris", "Heart Failure, Other"],
        "definition": "The specific disease or therapeutic area being targeted by the compound. Use for very specific disease queries or faceting."
    },
    {
        "core_name": "compound",
        "field_name": "therapeutic_category_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["cardiovascular diseases", "heart diseases", "angina pectoris"],
        "definition": "Broader, multi-valued therapeutic categories and their synonyms. **Use this field for broad category searches** in the `query` parameter."
    },
    {
        "core_name": "compound",
        "field_name": "therapeutic_category_hierarchy",
        "type": "string (multi-valued, hierarchical)",
        "example_values": ["Cardiovascular Diseases|Heart Diseases|Coronary Artery Disease|Angina Pectoris"],
        "definition": "The hierarchical classification of the therapeutic area (e.g., 'Category|Subcategory|Specific Area'). Useful for hierarchical faceting or broader path-based searches. [12, 16, 18, 24]"
    },
    {
        "core_name": "compound",
        "field_name": "mechanism",
        "type": "string (multi-valued, specific, for faceting)",
        "example_values": ["Beta-1 Adrenergic Receptor Antagonist"], # Placeholder
        "definition": "The specific mechanism of action of the compound. Use for very specific mechanism queries or faceting."
    },
    {
        "core_name": "compound",
        "field_name": "mechanism_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["beta blocker", "adrenergic receptor antagonist"], # Placeholder
        "definition": "Broader, multi-valued mechanisms of action and their synonyms. **Use this field for broad mechanism searches** in the `query` parameter."
    },
    {
        "core_name": "compound",
        "field_name": "mechanism_type",
        "type": "string (multi-valued, categorical)",
        "example_values": ["Cardioprotectants", "Antihypertensive Agents", "Beta-1 Blockers"],
        "definition": "High-level classification of the mechanism type."
    },
    {
        "core_name": "compound",
        "field_name": "mechanism_type_hierarchy",
        "type": "string (multi-valued, hierarchical)",
        "example_values": ["Tissue Protectants|Cardioprotectants", "Adrenergic Receptor Modulators|Beta Adrenergic Receptor Modulators|Beta Blockers|Beta-1 Blockers"],
        "definition": "The hierarchical classification of the mechanism type."
    },
    {
        "core_name": "compound",
        "field_name": "target_name",
        "type": "string (multi-valued, exact match, for faceting)",
        "example_values": ["Beta1 Adrenergic"],
        "definition": "The specific name of the biological target(s) of the compound. **Use this field for `terms` faceting** on targets."
    },
    {
        "core_name": "compound",
        "field_name": "target_name_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["Beta1 Adrenergic", "Beta-1 Adrenergic Receptor", "ADRB1"],
        "definition": "A field with all known names and synonyms for the biological target(s). **Use this field for all `query` parameter searches** involving a target name."
    },
    {
        "core_name": "compound",
        "field_name": "target_type",
        "type": "string (multi-valued, categorical)",
        "example_values": ["protein", "biochemical process/pathway", "other"],
        "definition": "The type of biological target (e.g., protein, pathway)."
    },
    {
        "core_name": "compound",
        "field_name": "route",
        "type": "string (multi-valued, categorical)",
        "example_values": ["ORAL", "INJECTION", "TOPICAL"],
        "definition": "The primary route of administration for the compound. Good for faceting on exact routes."
    },
    {
        "core_name": "compound",
        "field_name": "route_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["oral", "parenteral", "injection"],
        "definition": "Broader, multi-valued routes of administration and their synonyms. **Use this field for broad route searches** in the `query` parameter."
    },
    {
        "core_name": "compound",
        "field_name": "route_branch_hierarchy",
        "type": "string (multi-valued, hierarchical)",
        "example_values": ["ORAL"],
        "definition": "The hierarchical classification of the route of administration."
    },
    {
        "core_name": "compound",
        "field_name": "form_name",
        "type": "string (multi-valued, categorical)",
        "example_values": ["ORAL|Oral Tablet", "INJECTION|Solution"],
        "definition": "The pharmaceutical form of the compound, often combined with the route (e.g., 'Route|Form')."
    },
    {
        "core_name": "compound",
        "field_name": "drug_delivery_technology",
        "type": "string (multi-valued, specific, for faceting)",
        "example_values": ["Conventional Melt Tablets", "Oral Matrix MR", "Bioadhesion"],
        "definition": "Specific categories of drug delivery technology employed for the compound. **Use this field for `terms` faceting** on specific delivery technologies."
    },
    {
        "core_name": "compound",
        "field_name": "drug_delivery_branch_s",
        "type": "string (multi-valued, for searching)",
        "example_values": ["oral", "oral modified release", "oral extended release"],
        "definition": "The method of drug administration technology and its broader search-friendly terms. **Use this for `query` parameter searches about drug delivery technologies**."
    },
    {
        "core_name": "compound",
        "field_name": "earliest_approval_date",
        "type": "date",
        "example_values": ["1986-06-19T00:00:00Z"],
        "definition": "The earliest known approval date for the compound in ISO 8601 format. Use for precise date range queries."
    },
    {
        "core_name": "compound",
        "field_name": "approval_year",
        "type": "number (multi-valued, year)",
        "example_values": [1992, 2000, 2001],
        "definition": "The 4-digit year(s) of approval for the compound. Use for queries involving whole years."
    },
    {
        "core_name": "compound",
        "field_name": "compound_territory",
        "type": "string (multi-valued, hierarchical)",
        "example_values": ["United States of America", "Americas Northern", "Europe", "World"],
        "definition": "The geographic territories where the compound is approved or marketed. It is hierarchical. Use for filtering by location. [12, 16, 18, 24]"
    },
    {
        "core_name": "compound",
        "field_name": "is_orphan",
        "type": "string (boolean)", # Solr typically stores booleans as strings or numbers [14, 15, 21, 23]
        "example_values": ["yes", "no"],
        "definition": "Indicates if the compound has received orphan drug designation. Orphan drugs are intended for rare diseases that affect a small population, making them less profitable to develop without incentives. [2, 4, 7, 9, 10]"
    },
    {
        "core_name": "compound",
        "field_name": "is_prodrug",
        "type": "string (boolean)",
        "example_values": ["yes", "no"],
        "definition": "Indicates if the compound is a prodrug (an inactive compound that is metabolized in the body to an active drug)."
    },
    {
        "core_name": "compound",
        "field_name": "black_box",
        "type": "string (boolean)",
        "example_values": ["yes", "no"],
        "definition": "Indicates if the compound carries a 'Black Box Warning' (the strongest warning by the FDA that a drug carries significant risks)."
    },
    {
        "core_name": "compound",
        "field_name": "molecular_weight",
        "type": "number (metric)",
        "example_values": [652.816, 300.25],
        "definition": "The molecular weight of the compound in Daltons. Use for numerical range queries."
    },
    {
        "core_name": "compound",
        "field_name": "logP",
        "type": "number (metric)",
        "example_values": [2.5, -0.7, 4.1],
        "definition": "The logarithm of the octanol-water partition coefficient, a measure of a compound's lipophilicity (fat-liking) or hydrophilicity (water-liking). Higher values indicate more lipophilicity. [1, 3, 5, 6, 8]"
    }
]


def format_metadata_for_prompt(core_name="news"):
    """Formats the field metadata for a specific core into a string for the LLM prompt."""
    formatted_string = ""
    # Filter fields by the provided core name
    for field in field_metadata:
        if field.get("core_name") == core_name:
            formatted_string += f"- **{field['field_name']}**\n"
            formatted_string += f"  - **Type**: {field['type']}\n"
            formatted_string += f"  - **Definition**: {field['definition']}\n"
            formatted_string += f"  - **Examples**: {', '.join(map(str, field['example_values']))}\n\n"
    return formatted_string