lynn-twinkl
commited on
Commit
·
cb9c1ba
1
Parent(s):
a5f34f7
Changed model to 4.1 mini; added another few shot example for abstract statements
Browse files
functions/extract_usage.py
CHANGED
|
@@ -7,8 +7,8 @@ load_dotenv()
|
|
| 7 |
def extract_usage(docs, max_concurrency: int = 15) -> List[List[str]]:
|
| 8 |
|
| 9 |
llm = ChatOpenAI(
|
| 10 |
-
model='gpt-4.1-
|
| 11 |
-
temperature=0.
|
| 12 |
)
|
| 13 |
|
| 14 |
prompt = ChatPromptTemplate.from_messages(
|
|
@@ -22,7 +22,7 @@ def extract_usage(docs, max_concurrency: int = 15) -> List[List[str]]:
|
|
| 22 |
- Users will submit excerpts from grant application letters.
|
| 23 |
- From each letter, extract only the tangible items or clearly defined services the school wants to use the grant for.
|
| 24 |
- Output the extracted items as a **clean, comma-separated list**, with no additional explanation or formatting.
|
| 25 |
-
- Do not include abstract goals or general program names (e.g., "Arts Award program"
|
| 26 |
- Focus on concrete nouns that represent resources or services the grant would directly fund (e.g., "paint", "laptops", "counseling sessions", "sports equipment").
|
| 27 |
- If no **specific** tangible items or clearly defined services are found according to the spcifications above, simply return None.
|
| 28 |
|
|
|
|
| 7 |
def extract_usage(docs, max_concurrency: int = 15) -> List[List[str]]:
|
| 8 |
|
| 9 |
llm = ChatOpenAI(
|
| 10 |
+
model='gpt-4.1-mini',
|
| 11 |
+
temperature=0.2
|
| 12 |
)
|
| 13 |
|
| 14 |
prompt = ChatPromptTemplate.from_messages(
|
|
|
|
| 22 |
- Users will submit excerpts from grant application letters.
|
| 23 |
- From each letter, extract only the tangible items or clearly defined services the school wants to use the grant for.
|
| 24 |
- Output the extracted items as a **clean, comma-separated list**, with no additional explanation or formatting.
|
| 25 |
+
- **Do not include abstract goals or general program names** (e.g., "Arts Award program", "student development","community projects").
|
| 26 |
- Focus on concrete nouns that represent resources or services the grant would directly fund (e.g., "paint", "laptops", "counseling sessions", "sports equipment").
|
| 27 |
- If no **specific** tangible items or clearly defined services are found according to the spcifications above, simply return None.
|
| 28 |
|