datadabllp

LLM agent assist in patent analysis

Aug 20th, 2024
563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. def analyze_patents(patent_database, research_focus):
  2.     prompt = f"""
  3.    Analyze the following patent database: {patent_database}
  4.    
  5.    Focus on research area: {research_focus}
  6.    
  7.    Provide:
  8.    1. Key innovation trends
  9.    2. Potential white spaces for new patents
  10.    3. Recommendations for R&D focus areas
  11.    """
  12.    
  13.     response = openai.Completion.create(
  14.         engine="text-davinci-002",
  15.         prompt=prompt,
  16.         max_tokens=750
  17.     )
  18.    
  19.     return response.choices[0].text.strip()
  20.  
  21. # Usage
  22. patent_insights = analyze_patents(patent_database, "renewable energy storage")
  23. print(patent_insights)
  24.  
Advertisement
Add Comment
Please, Sign In to add comment