Skip to content

Applied Large Language Model for extracting entities from job descriptions and classifying news given only a few examples of human scores

License

Notifications You must be signed in to change notification settings

degagawolde/in-context-learning

Repository files navigation

in-context-learning

The complexity, cost, and skills required to produce LLMs is immense. Only larger companies and other international groups are able to train LLMs at the size of hundreds of billions of parameters. Given the benefit of LLMs to drive business and society, it is important to learn to use these monster AI models for multiple use in business and social problems. The need for specialized skills in prompt engineering will grow fast as more and and more companies start building their business around LLMs and similar products such as DALL-E 2, MidJourney, Bloom, etc.

Objective

Large Language Model(LLMS) can be used for multiple use in business and social problem. The objective of this challenge is to generate prompts for LLMs to extract relevant entities from job descriptions and also to classify news artifacts given only a few examples of human scores

Entity Extraction Using the LLMS API

entity Entity Extraction with Cohere API --notebooks/CohereEntityExtract.ipynb

Connect to Cohere API

import cohere
co = cohere.Client(api_key)

News Scoring Using the LLMS API

scoring

News Artifact scoring Cohere API -- notebooks/CohereNewsScoring.ipynb

co.classify(
      model='medium',  
      inputs=[text], # the string to be classified
      examples=examples # a couple of examples - training set
  )

Text Analysis using DeepAI API

Text Analysis with DeepAI API -- notebooks/DeepAITextAnlaysis.ipynb

Connect to the DeepAI API and do sentimental analysis on the given text

requests.post(
    "https://api.deepai.org/api/sentiment-analysis",
    data={
        'text': 'Africa is a land of origin for human kind',
    },
    headers={'api-key': api_key}
)

Connect to the DeepAI API and summarize the given text

# Example posting a local text file:
requests.post(
    "https://api.deepai.org/api/summarization",
    files={
        'text': open('../data/experimental/interim.txt', 'rb'),
    },
    headers={'api-key': api_key}
)

Streamlit Dashboard frontend and Fast API backend

streamlit dashboard streamlitapp/main.py

Fast API backend/backend_main.py

Watch the APP

Author

@degagawolde

About

Applied Large Language Model for extracting entities from job descriptions and classifying news given only a few examples of human scores

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published