Spaces:
Runtime error
Runtime error
Minor refactor in til prompts
Browse files- crew/til.py +7 -6
- test.py +5 -1
crew/til.py
CHANGED
|
@@ -74,9 +74,10 @@ class TilCrew:
|
|
| 74 |
"1. Is the TIL insightful?"
|
| 75 |
"2. Is the TIL factually correct and accurate?"
|
| 76 |
"3. Is the TIL written in simple english?"
|
| 77 |
-
"4. Is the TIL grammatically correct?"
|
| 78 |
|
| 79 |
-
"Can you provide a score for on the scale of 10 for each of the TIL on each of these criteria and provide reasons for the score,
|
|
|
|
| 80 |
f"Formatting Instructions: {feedback_parser.get_format_instructions()}"
|
| 81 |
),
|
| 82 |
HumanMessagePromptTemplate.from_template("{til_content}")
|
|
@@ -93,16 +94,16 @@ class TilFeedbackResult(BaseModel):
|
|
| 93 |
til: str = Field(description="TIL content the user has provided on which we are performing the analysis.")
|
| 94 |
insightful_score: int = Field(
|
| 95 |
description="TIL scores should be based solely on insightful criteria, with no other factors considered.")
|
| 96 |
-
insightful_reason: str = Field(description="
|
| 97 |
factuality_score: int = Field(
|
| 98 |
description="TIL scores should be based solely on factuality criteria, with no other factors considered.")
|
| 99 |
-
factuality_reason: str = Field(description="
|
| 100 |
simplicity_score: int = Field(
|
| 101 |
description="TIL scores should be based solely on simplicity criteria, with no other factors considered.")
|
| 102 |
-
simplicity_reason: str = Field(description="
|
| 103 |
grammatical_score: int = Field(
|
| 104 |
description="TIL scores should be based solely on grammatical criteria, with no other factors considered.")
|
| 105 |
-
grammatical_reason: str = Field(description="
|
| 106 |
final_suggestion: str = Field(
|
| 107 |
description="Final suggested version of the TIL")
|
| 108 |
|
|
|
|
| 74 |
"1. Is the TIL insightful?"
|
| 75 |
"2. Is the TIL factually correct and accurate?"
|
| 76 |
"3. Is the TIL written in simple english?"
|
| 77 |
+
"4. Is the TIL grammatically correct?\n"
|
| 78 |
|
| 79 |
+
"Can you provide a score for on the scale of 10 for each of the TIL on each of these criteria and provide reasons for the score, "
|
| 80 |
+
" the reason/feedback should be presented in the Point Of View of the Reviewer and the feedback should be direct."
|
| 81 |
f"Formatting Instructions: {feedback_parser.get_format_instructions()}"
|
| 82 |
),
|
| 83 |
HumanMessagePromptTemplate.from_template("{til_content}")
|
|
|
|
| 94 |
til: str = Field(description="TIL content the user has provided on which we are performing the analysis.")
|
| 95 |
insightful_score: int = Field(
|
| 96 |
description="TIL scores should be based solely on insightful criteria, with no other factors considered.")
|
| 97 |
+
insightful_reason: str = Field(description="Feedback for low insightful_score if it is not 10")
|
| 98 |
factuality_score: int = Field(
|
| 99 |
description="TIL scores should be based solely on factuality criteria, with no other factors considered.")
|
| 100 |
+
factuality_reason: str = Field(description="Feedback for low factuality_score if it is not 10")
|
| 101 |
simplicity_score: int = Field(
|
| 102 |
description="TIL scores should be based solely on simplicity criteria, with no other factors considered.")
|
| 103 |
+
simplicity_reason: str = Field(description="Feedback for low simplicity_score if it is not 10")
|
| 104 |
grammatical_score: int = Field(
|
| 105 |
description="TIL scores should be based solely on grammatical criteria, with no other factors considered.")
|
| 106 |
+
grammatical_reason: str = Field(description="Feedback for low grammatical_score if it is not 10")
|
| 107 |
final_suggestion: str = Field(
|
| 108 |
description="Final suggested version of the TIL")
|
| 109 |
|
test.py
CHANGED
|
@@ -27,7 +27,11 @@ def main():
|
|
| 27 |
"* Qunatization is the process of reducing the size of LLM models by reducing the underlying weights.\n"
|
| 28 |
"* The weights are reduced by scaling down the datatypes from a datatype that takes larger space to a data type that takes a smaller space, this is also knows as downcasting.\n"
|
| 29 |
"* Advantages: takes lesser space and increases compute speed\n"
|
| 30 |
-
"* Disadvantages: Answers are less precise"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
if st.button("Get Feedback"):
|
| 33 |
with st.status(
|
|
|
|
| 27 |
"* Qunatization is the process of reducing the size of LLM models by reducing the underlying weights.\n"
|
| 28 |
"* The weights are reduced by scaling down the datatypes from a datatype that takes larger space to a data type that takes a smaller space, this is also knows as downcasting.\n"
|
| 29 |
"* Advantages: takes lesser space and increases compute speed\n"
|
| 30 |
+
"* Disadvantages: Answers are less precise\n"
|
| 31 |
+
"* Today I learnt Sidecar pattern\n"
|
| 32 |
+
"* Learnt about go-lang routines to add concurrency in the React App.\n"
|
| 33 |
+
"* Upon delving into the intricacies of Docker, I have acquired the capability to encapsulate our application within containers, thereby streamlining the deployment process across a multitude of heterogeneous environments.\n",
|
| 34 |
+
key='til_content', help='Enter what you learnt today')
|
| 35 |
|
| 36 |
if st.button("Get Feedback"):
|
| 37 |
with st.status(
|