-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a552cf0
commit b741f37
Showing
11 changed files
with
329 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from triplea.schemas.article import Article | ||
from triplea.service.repository.export.engine import export_engine | ||
|
||
|
||
def fx_filter(article:Article): | ||
for i in article.ReviewLLM: | ||
if i['TemplateID'] == "Ass11": | ||
return True | ||
# Finally | ||
return False | ||
|
||
|
||
def fx_transform(article:Article): | ||
for i in article.ReviewLLM: | ||
if i['TemplateID'] == "Ass11": | ||
if 'D' in i['Response']: | ||
return { "Out" : i['Response']['D'] } | ||
|
||
return "" | ||
|
||
def fx_output(output): | ||
if 'Out' in output: | ||
return output['Out'] | ||
|
||
if __name__ == "__main__": | ||
ol = export_engine(fx_filter,fx_transform,fx_output,limit_sample=100) | ||
f = open("outputfile.txt", "a") | ||
for o in ol: | ||
if o is not None: | ||
if o != "": | ||
f.write(f"{o}\n") | ||
f.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# LLM Template | ||
|
||
|
||
|
||
# Version | ||
|
||
|
||
## 0.0.2 | ||
- Add `response_must_be_json` | ||
- Add `stop_immediately` | ||
|
||
## 0.0.1 |
2 changes: 1 addition & 1 deletion
2
llm_profile_template_biblio-analysis.json → llm_template/T102.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"version" : "0.0.2", | ||
"stop_immediately": 0, | ||
"model_template_id": "Ass11", | ||
"model_name": "mistralai_Mistral-7B-Instruct-v0.2", | ||
"base_path":"http://localhost:5003/v1", | ||
"temperature": 0.7, | ||
"frequency_penalty": 0, | ||
"presence_penalty": 0, | ||
"max_tokens": 500, | ||
"top_p": 0.9, | ||
"response_must_be_json": true, | ||
"template": "Evaluate the title and abstract of the article below regarding its connection to LLMs (Large Language Models) Evaluation and Assessment. Determine whether there is a link to the medical field and/or clinical practice. Should such a relationship exist, identify the appropriate medical subcategory from the list below: Anesthesiology, Cardiology, Dermatology, Endocrinology, Gastroenterology, Hematology, Infectious Diseases, Neurology, Oncology, Ophthalmology, Orthopedics, Pathology, Pediatrics, Psychiatry, Radiology, Surgery, Allergology, Critical Care Medicine, Emergency Medicine, Geriatrics, Immunology, Nuclear Medicine, Palliative Care, Plastic & Reconstructive Surgery, Public Health, Sports Medicine or etc. \ntitle: {title} \nabstract : {abstract} \nPrepare my answer as below structure (JSON schema) in JSON format: \nField A: This article related to Evaluation and Assessment of LLMs (Large Language Models).The answer should be True or False. \nField B: Determine whether there is a link to the medical field and/or clinical practice.The answer should be True or False. \nField C: This article related to Evaluation and Assessment of LLMs (Large Language Models) in medical field and/or clinical practice.The answer should be True or False. \nField D: What medical subcategory is the subject of the research related to, for example, cardiology or urology or pharmacology? \nField E: Description. Any additional explanation you want to give is not placed in other fields.\n JSON sample:\n{{\"A\": true, \"B\": true, \"C\": true,\"D\": \"cardiology\", \"E\": \"Description\"}}\nNote that the output format must be JSON." | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.