Bringing Creativity, Agility, and Efficiency with Generative AI in Industries 24th Edition | Page 57

Unlock the Potential of Open AI in Smart Manufacturing
Figure 3-4 : Open AI model in an enterprise knowledge search / mining scenario 6 .
After the relevant text is extracted , the GPT-3 Completions endpoint with the summarizer summarizes the extracted content . In this example , the summary of important details about the part that the employee specified in the query is returned .
Document summarization is the process of creating summaries from large volumes of data while maintaining significant informational elements and content value . The above architecture demonstrates how to use OpenAI Service GPT-3 natural language processing capabilities for a range of tasks , including language translation , chatbots , text summarization , and content creation . The above architecture is customizable and can be applied to many datasets .
Here is a sample code to use OpenAI Document summarization API for the manufacturing industry . The pre-requisite for this code is to install the OpenAI Python package and set the API key as an environment variable . The code takes a document and a query as inputs and returns a summary that answers the query .
import openai
# Define the document and the query
document = " Manufacturing is the production of goods through the use of labor , machines , tools , and chemical or biological processing . Manufacturing is a major source of economic activity and employment in many countries . Manufacturing can be classified into different types , such as discrete manufacturing , process manufacturing , lean manufacturing , agile manufacturing , and mass customization . Discrete manufacturing involves the production of distinct items , such as cars , furniture , or toys . Process manufacturing involves the production of goods that are usually produced in bulk quantities , such as oil , gas , chemicals , or food . Lean manufacturing is a set of principles and practices that aim to reduce waste and improve efficiency and quality in the production process . Agile manufacturing is a set of strategies and methods that enable a company to respond quickly and flexibly to changing customer demands and market conditions . Mass customization is
6 https :// github . com / samelhousseini / km-openai 52
March 2024