Hi GRT
I have tried to summarize a essay with size of 68k tokens and find 20 most repeated word along count in Sweden Central region today.
Duration found was - 18 second
import os
from openai import AzureOpenAI
# Environment setup
endpoint = os.getenv("ENDPOINT_URL", "https://testgpt41mm.openai.azure.com/")
deployment = os.getenv("DEPLOYMENT_NAME", "o3-mini")
subscription_key = os.getenv("AZURE_OPENAI_API_KEY", "<apikey>)
# Initialize Azure OpenAI client
client = AzureOpenAI(
azure_endpoint=endpoint,
api_key=subscription_key,
api_version="2025-01-01-preview",
)
# Simulate a long reasoning prompt (~60k tokens)
long_text = """ A request for a **60,000-word essay** is extremely large—such text volume would be roughly equivalent to a published book, amounting to over 150 single-spaced pages. Given the constraints of this platform and your likely intent to gain a comprehensive yet readable analysis, I will provide you with a **detailed and extensive outline** of such an essay, along with a richly developed **executive summary** (2000–3000 words). This will give you a strong foundation to expand further or request more specific sections in-depth.
If you would like a specific section (e.g., "Impact of Generative AI on White-Collar Jobs", or "Future Trends & Policy Recommendations") written in full detail, please specify.
---
# Impact of AI on the Job Market
---
## Executive Summary
### Introduction
The integration of Artificial Intelligence (AI) into the global labor market has stirred profound transformations, presenting a blend of challenges and opportunities across various sectors. As AI continues to advance and proliferate through technologies such as machine learning, automation, natural language processing, and robotics, its impact on employment patterns, skills demand, and socioeconomic structures has become more pronounced. This essay explores the multifaceted effects of AI on the job market, examining historical context, current dynamics, sectorial impacts, emerging opportunities, societal implications, and future outlooks.
### Historical Context and Drivers
AI isn’t the first technological innovation to disrupt the workplace; history offers multiple parallels—from the Industrial Revolution and the mechanization of agriculture, to the advent of computers automating back-office tasks. However, AI’s capacity to handle complex cognitive tasks, natural language understanding, and adaptive learning sets it apart, promising transformations not only in manual or routine work, but increasingly in white-collar and creative professions as well.
Key drivers behind AI’s expanding workplace role include:
- Dramatic cost reductions in computing power and data storage
- Improvements in algorithms (deep learning, reinforcement learning)
- Growth of big data sources for AI training
- Market pressure for efficiency and innovation
### Automation: Displacement and Transformation
#### Displacement
Many fear AI will render significant portions of the workforce obsolete. Automation of repetitive and predictable labor can already be seen in manufacturing, warehousing, logistics, and basic data entry. For example:
- **Industrial robots** have displaced assembly line workers.
- **AI-powered chatbots** are increasingly handling customer service roles.
- **Automated checkouts** reduce the need for cashiers.
Oxford University researchers (Frey & Osborne, 2013) estimated around 47% of U.S. jobs were at high risk of computerization. However, subsequent studies have nuanced these figures, suggesting that specific tasks within jobs, rather than entire occupations, are more likely to be automated.
#### Transformation
AI also augments human workers, transforming job roles rather than eliminating them. For instance:
- **Healthcare**: AI diagnostics can assist radiologists; administrative AI apps reduce paperwork, allowing doctors to spend more time with patients.
- **Finance**: Automated trading and fraud detection tools handle data-heavy tasks, while human analysts focus on strategy and client relations.
- **Education**: AI grading and tutoring systems offer personalized feedback, enabling teachers to focus on more creative, interpersonal aspects.
#### New Job Creation
Historically, technological progress has created new industries and roles. AI advances spur demand for:
- Data scientists, AI/ML engineers, AI product managers
- Professionals in AI ethics, safety, and policy
- “Robot maintenance” and AI system monitoring
- Emerging creative fields (e.g., AI artists, prompt engineers)
### Sector-Specific Impacts
#### Manufacturing & Logistics
These sectors have witnessed significant automation, from robotics on assembly lines to AI-powered inventory management. While manual labor jobs decline, there is increased demand for engineers, programmers, logistics planners, and maintenance technicians.
#### Healthcare
AI enables predictive diagnostics, personalized medicine, and intelligent medical devices. Some administrative """ *15 # Adjust multiplier to reach ~60k tokens
print("Input entered word count", len(long_text))
# Prepare the chat prompt
chat_prompt = [
{
"role": "developer",
"content": "You are an assistant that summarize input text in 30 lines and find 20 most repeated word and their count"
},
{
"role": "user",
"content": long_text
}
]
# Generate the completion
import time
start_time = time.time()
completion = client.chat.completions.create(
model=deployment,
messages=chat_prompt,
max_completion_tokens=2000, # Adjust based on how much output you want
reasoning_effort = "low" # low, medium, or high
)
dur = time.time()-start_time
print("Duration taken was ",dur)
print(completion.choices[0].message.content)
Output
Input entered word count 68055
Duration taken was 18.015239238739014
Below is a summary of the provided text in 30 lines followed by a list of 20 of its most repeated words (along with approximate counts):
──────────────────────────────
Summary (30 Lines):
1. The text begins by noting that a 60,000‐word essay is far too long for this platform.
2. Such an essay would equate to a full book, over 150 single-spaced pages.
3. Instead, the writer offers a detailed outline and an executive summary of 2000–3000 words.
4. This approach is intended as a foundation that can be expanded later.
5. Readers are invited to request specific sections if needed (for example, on generative AI’s impact on white-collar jobs).
6. The main topic is introduced as the “Impact of AI on the Job Market.”
7. The executive summary opens with an introduction to AI’s growing influence in the global labor market.
8. It stresses that AI is changing how work is done and creating both challenges and opportunities.
9. Various advanced technologies are mentioned, including machine learning, automation, natural language processing, and robotics.
10. Historical parallels (such as the Industrial Revolution and the automation of office tasks) are drawn.
11. The text explains that previous technological disruptions have transformed work environments.
12. It emphasizes that unlike earlier technologies, AI can perform complex cognitive tasks.
13. The summary outlines key drivers of AI’s growth: falling costs in computing and data storage.
14. It also highlights algorithmic improvements (like deep and reinforcement learning) and the availability of big data.
15. Market pressures for efficiency and innovation are noted as further catalysts.
16. The impact of AI is broken down into three parts: displacement of tasks, transformation of job roles, and the creation of new jobs.
17. In terms of displacement, repetitive and predictable tasks in many industries are already being automated.
18. Specific examples include industrial robots on assembly lines, chatbots in customer service, and automated checkouts in retail.
19. Research, such as that by Oxford University, is cited to illustrate the risk for many U.S. jobs.
20. However, the text clarifies that often only certain tasks within a job are automated.
21. The discussion then shifts to transformation, where AI augments and enhances human work.
22. In healthcare, for instance, AI supports diagnostics and reduces administrative burdens.
23. In finance, data-heavy tasks are automated while human analysts focus on strategy.
24. Educational applications also use AI for personalized grading and tutoring.
25. New job creation is another major theme, with fresh roles emerging alongside technological progress.
26. These new roles include positions for data scientists, AI/ML engineers, as well as AI product managers.
27. There is also increasing demand for professionals in AI ethics, safety, and policy.
28. The manufacturing and logistics sectors are noted for significant shifts from manual work toward technical roles.
29. In healthcare, advancements include predictive diagnostics and intelligent medical devices.
30. Overall, the essay outlines that AI is reshaping the job market by transforming work, displacing selected tasks, and creating innovative roles.
──────────────────────────────
Twenty Most Repeated Words (Approximate Counts):
1. AI – 60
2. the – 55
3. and – 50
4. of – 45
5. a – 40
6. to – 38
7. in – 35
8. essay – 30
9. job – 28
10. automation – 25
11. with – 22
12. for – 20
13. is – 20
14. on – 20
15. jobs – 18
16. summary – 18
17. detailed – 16
18. outline – 16
19. market – 15
20. impact – 15
Looking forward to hearing an update on any improvement from your side before connecting scheduled call tomorrow.
Thank you.