diff --git a/backend/src/agents/datastore_agent.py b/backend/src/agents/datastore_agent.py index f876f9a0..25ea4935 100644 --- a/backend/src/agents/datastore_agent.py +++ b/backend/src/agents/datastore_agent.py @@ -106,7 +106,12 @@ async def get_semantic_layer_cache(llm, model, graph_schema): @agent( name="DatastoreAgent", - description="This agent is responsible for handling database queries relating to the user's personal data.", + description=( + "This agent is responsible for handling database queries related to ESG (Environmental, Social, Governance) " + "data, including retrieving ESG scores, financial metrics, and other company-specific or fund-specific " + "information. It interacts with the graph database to extract, process, and return ESG-related information " + "from various sources, such as company sustainability reports or fund portfolios." + ), tools=[generate_cypher], ) class DatastoreAgent(Agent): diff --git a/backend/src/utils/cyper_import_data_from_csv.py b/backend/src/utils/cyper_import_data_from_csv.py index 83d7f8ea..5476e09f 100644 --- a/backend/src/utils/cyper_import_data_from_csv.py +++ b/backend/src/utils/cyper_import_data_from_csv.py @@ -1,7 +1,22 @@ import_data_from_csv_script = """ LOAD CSV WITH HEADERS FROM 'file:///esg_poc.csv' AS row -MERGE (f:Fund {Name: row.`Fund Name`, Size: toFloat(row.`Fund Size (Billion USD)`)}) +MERGE (f:Fund {Name: row.`Fund Name`, Size: toFloat(row.`Fund Size (Billion USD)`), + SizeUnit: + CASE + WHEN "Fund Size (Billion USD)" in keys(row) THEN "Billion" + WHEN "Fund Size (Million USD)" IN keys(row) THEN "Million" + WHEN "Fund Size (Thousand USD)" IN keys(row) THEN "Thousand" + ELSE "Unknown" + END, + Currency: + CASE + WHEN "Fund Size (Billion USD)" IN keys(row) THEN "USD" + WHEN "Fund Size (Billion EUR)" IN keys(row) THEN "EUR" + WHEN "Fund Size (Billion GBP)" IN keys(row) THEN "GBP" + ELSE "USD" + END +}) MERGE (c:Company {Name: row.`Company Name`})