Skip to content

Commit d57f54d

Browse files
committed
update prompt
1 parent 3847335 commit d57f54d

File tree

2 files changed

+21
-35
lines changed

2 files changed

+21
-35
lines changed

classifier/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ FROM python:3.11-slim as build
22

33
WORKDIR /app
44

5-
COPY . .
6-
75
ARG NOCO_DB_URL
86
ARG NOCO_XC_TOKEN
97
ARG LLM_URL
@@ -14,8 +12,12 @@ ENV LLM_URL=${LLM_URL}
1412

1513
ENV PYTHONUNBUFFERED=1
1614

15+
COPY requirements.txt .
16+
1717
RUN pip install --no-cache-dir -r requirements.txt
1818

19+
COPY . .
20+
1921
EXPOSE 5001
2022

2123
CMD ["python", "./app.py"]

classifier/app.py

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,48 +25,32 @@ class LLMOutput(BaseModel):
2525

2626
prompt = """Conduct an evaluation of the provided content using the following rubric.
2727
Assess whether the headline and body indicate financial activities where a Chinese financial institution
28-
is acting as the lender. Evaluate each factor separately, make an overall assessment, and then provide a justification for the overall score.
29-
Keep the justification concise, up to 25 words.
30-
31-
Be very strict in the overall assessment score—if any of the required factors is not met, the overall score should be 1.
28+
is acting as the lender. Evaluate each factor separately, providing a score from 1-5 and a justification for it. Keep the justification concise, up to 25 words.
3229
3330
Scoring Rubric:
3431
35-
A. Chinese Lender in a Loan for Development or Infrastructure Projects
36-
Score 5: The content explicitly names a Chinese financial institution, such as the Import-Export Bank of China
37-
or the China Development Bank, as the lender in a loan or financial agreement.
38-
39-
Score 3: A Chinese lender is mentioned in connection with financial activities,
40-
but its role as the lender in the transaction is unclear or speculative.
41-
42-
Score 1: No reference to a Chinese lender, or only mentions 'foreign banks' or 'international financial institutions'
43-
without specifying China.
44-
45-
B. Loan Agreements and Transactions
46-
Score 5: The content describes a loan agreement or financial transaction where a Chinese lender is providing funds,
47-
including details such as loan amounts, agreements, or signing ceremonies.
48-
49-
Score 3: The content discusses potential loans or ongoing negotiations involving a Chinese lender
50-
but does not confirm a formal agreement.
51-
52-
Score 1: No mention of loan agreements, signing ceremonies, or related transactions involving a Chinese lender.
32+
A. Recipient
33+
Score 5: Clearly identifies a recipient of the loan, either by explicitly stating the loan is received or by indicating that a project is being undertaken in a specific country, implying it as the borrower/host.
34+
Score 3: Mentions a country or entity in connection with financing but does not clearly establish it as the loan recipient.
35+
Score 1: No recipient is mentioned, or there is no clear indication of who is receiving the loan.
5336
54-
C. Information on Loans or Debt
55-
Score 5: The content provides detailed information on outstanding loans, repayment terms, or debt obligations
56-
linked to a Chinese lender.
5737
58-
Score 3: The content references loans or debt but lacks specific details about the involvement of a Chinese lender.
38+
B. Chinese Lender
39+
Score 5: The content explicitly names a Chinese financial institution, such as the Import-Export Bank of China (Exim bank) or the China Development Bank (CDB), as the lender in a loan or financial agreement.
40+
Score 3: A Chinese lender or actor is mentioned in connection with financial activities, but its role as the lender in the transaction is unclear or speculative.
41+
Score 1: No reference to a Chinese funder or the given project is associated with non-Chinese lenders such as the World Bank or another country’s finance institution.
5942
60-
Score 1: No mention of loans, debt, or financial obligations involving China.
6143
62-
D. Chinese Financial Institutions Investing in or Extending Credit
63-
Score 5: The content discusses Chinese financial institutions investing in or providing credit to a government,
64-
organization, or entity as part of a financial agreement.
44+
C. Financial Instrument
45+
Score 5: Clearly identifies the transaction as a loan, using terms like lending, borrowing, debt, or loan.
46+
Score 3: Mentions financing or general support but does not explicitly confirm it as a loan. The description is vague regarding the financial instrument.
47+
Score 1: Indicates the transaction is not a loan, instead describing it as an equity investment, grant, or donation.
6548
66-
Score 3: There is mention of Chinese economic engagement, but it is unclear whether it directly involves lending
67-
or financial transactions.
6849
69-
Score 1: No indication of Chinese financial institutions participating in lending or financial activities.
50+
D. Activity Precision
51+
Score 5: Specifies a clear infrastructure project or a defined cooperation model where China and the recipient work together on development, such as infrastructure or a technical agreement. If the recipient is a bank, it is stated that the facility is for on-lending purposes.
52+
Score 3: Refers to general development support without specifying a particular project or cooperation model. Or refers to a specific activity such as infrastructure development but does the connection with Chinese financing is not clear.
53+
Score 1: Mentions China’s support but provides no details on the specific activity or project involved.
7054
"""
7155

7256

0 commit comments

Comments
 (0)