{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from langchain_groq import ChatGroq" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Virat Kohli is a renowned Indian international cricketer who has been one of the most successful batsmen in the world. Born on November 5, 1988, in Delhi, India, Kohli is widely regarded as one of the greatest batsmen of all time.\n", "\n", "Kohli made his international debut in 2008 and has since become a key player for the Indian national team. He has played in all formats of the game, including Test matches, One-Day Internationals (ODIs), and Twenty20 Internationals (T20Is).\n", "\n", "Some of Kohli's notable achievements include:\n", "\n", "1. **Highest run-scorer in ODIs**: Kohli is the fastest batsman to reach 12,000 runs in ODIs and has the highest number of centuries in the format.\n", "2. **Test captaincy**: Kohli has been the captain of the Indian Test team and has led the team to several victories, including a historic series win in Australia in 2018-19.\n", "3. **IPL success**: Kohli has been a successful captain of the Royal Challengers Bangalore (RCB) team in the Indian Premier League (IPL) and has led the team to several playoff appearances.\n", "4. **Awards and accolades**: Kohli has won numerous awards, including the ICC ODI Player of the Year award, the BCCI's International Cricketer of the Year award, and the Padma Shri, India's fourth-highest civilian honor.\n", "\n", "Kohli is known for his aggressive batting style, his ability to score runs in all conditions, and his leadership qualities. He is widely regarded as one of the greatest cricketers of all time, and his on-field success has made him a beloved figure in India and around the world.\n" ] } ], "source": [ "from langchain_groq import ChatGroq\n", "\n", "llm = ChatGroq(\n", " temperature=0, \n", " groq_api_key='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', \n", " model_name=\"llama-3.1-70b-versatile\"\n", ")\n", "\n", "response = llm.invoke(\"Who is Virat kohli?\")\n", "print(response.content)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Apply for Auszubildende/r 2024 im Einzelhandel - 37.5H - Metzingen (w/m/d)\n", "\n", "Search JobsSkip navigationSearch JobsNIKE, INC. JOBSContract JobsJoin The Talent CommunityLife @ NikeOverviewBenefitsBrandsOverviewJordanConverseTeamsOverviewAdministrative SupportAdvanced InnovationAir Manufacturing InnovationAviationCommunicationsCustomer ServiceDesignDigitalFacilitiesFinance & AccountingGovernment & Public AffairsHuman ResourcesInsights & AnalyticsLegalManufacturing & EngineeringMarketingMerchandisingPlanningPrivacyProcurementProduct Creation, Development & ManagementRetail CorporateRetail StoresSalesSocial & Community ImpactSports MarketingStrategic PlanningSupply Chain, Distribution & LogisticsSustainabilityTechnologyLocationsOverviewNike WHQNike New York HQEHQ: Hilversum, The NetherlandsELC: Laakdal, BelgiumGreater China HQDiversity, Equity & InclusionOverviewMilitary InclusionDisability InclusionIndigenous InclusionInternshipsInternshipsAuszubildende/r 2024 im Einzelhandel - 37.5H - Metzingen (w/m/d)Metzingen, Baden-WurttembergBecome a Part of the NIKE, Inc. Team\n", "NIKE, Inc. does more than outfit the world’s best athletes. It is a place to explore potential, obliterate boundaries and push out the edges of what can be. The company looks for people who can grow, think, dream and create. Its culture thrives by embracing diversity and rewarding imagination. The brand seeks achievers, leaders and visionaries. At NIKE, Inc. it’s about each person bringing skills and passion to a challenging and constantly evolving game.NIKE Auszubildende/r (Athlete) - Startdatum im SeptemberKarriere bei Nike Retail           NIKE, Inc. stattet nicht nur die besten Sportler der Welt aus – wir entdecken Potenziale, überwinden Grenzen und pushen bis ans Limit und darüber hinaus. Wir suchen nach Leuten, die lernen und denken, träumen und gestalten. Unsere Unternehmenskultur lebt von Diversität und Imagination. Wir brauchen talentierte Kollegen, Leader und Visionäre. Bei Nike, Inc. trägt jeder mit seinen Skills und purer Passion zu einer sich stetig verändernden und wachsenden Herausforderung bei.In Stores zu arbeiten bedeutet, das Gesicht von NIKE, Inc. zu sein. Mit einem konstanten Fokus auf Produktwissen und Kundenservice sorgen unsere Store Teams täglich für wertvolle Einkauferlebnisse. Von London bis nach Istanbul, jeder Store ist einzigartig und hat seine eigene, spannende Community von Sport und Style Enthusiasten. Für eine Karriere im Einzelhandel bei NIKE benötigst du Kreativität und Ambitionen, während wir dir die Möglichkeit geben, dich mit den besten Athleten und Teammitgliedern weiterzuentwickeln und über dich hinauszuwachsen. Weißt du, was wir brauchen, um das beste Retail Team der Welt zu erschaffen? Jemanden wie DICH!Komm ins NIKE, Inc. Team!Deine Aufgaben als Auszubildene/r: Deine Expertise im Bereich des exklusiven Kundenservices und Produktwissens nutzen, um eine besondere Brand Experience für unsere Käufer zu schaffen.Du unterstützt die verschiedensten Bereiche des Stores (z. B. Kasse, Warenein- und -ausgang, Auffüllen von Waren auf der Verkaufsfläche, Aufstellen von Displays) und empfiehlst Kund:innen geeignete Produkte, um die Umsatzziele zu erreichen.Du nutzt dein Wissen über digitale Geräte, um Online- und Offlineverkauf sowie Services im Store nahtlos miteinander zu verknüpfen.Du informierst Kund:innen und neue Mitarbeiter:innen über NIKE Produkte und Services.Du lernst Nike’s Lieferketten und Einzelhandelsprozesse kennen und wirst qualitätssichernde Massnahmen entwickeln und durchführen.Ein Brand Ambassador für NIKE Initiativen sein. Was du bekommst:Attraktive Mitarbeiterrabatte im Store und im OnlineshopSpannende Entwicklungs- und KarrieremöglichkeitenRegelmäßige Verkaufs- und ProduktschulungenEin dynamisches und motivierendes Arbeitsumfeld mit flachen Hierarchien, in welchem die Werte Diversity, Equity & Inclusion (DE&I) gelebt werdenMitarbeiterkleidung, womit du NIKE repräsentierst und den Teamspirit förderstZugang zu exklusiven TrainingsinhaltenDie Möglichkeit, an einzigartigen NIKE Events teilzunehmen Was du mitbringst:Die Passion für NIKE und/oder die Liebe zum SportKompetenz für hervorragenden Kundenservice / Begeisterung für den Umgang mit Kund:innenGute Deutsch- und EnglischkentnisseGute Kommunikations- und TeamfähigkeitProaktivität, Offenheit sowie Motivation und die Leidenschaft, unsere Kunden immer an die erste Stelle zu setzenBereitschaft, an Wochenenden und in Schichten zu arbeiten Schaue dir dieses Video an, um mehr über die Atmosphäre in unseren Stores zu entdecken und über unsere Store Traditionen zu lernen.Haben wir dein Interesse geweckt und möchtest du uns bei unserer Mission â€�To bring inspiration and innovation to every athlete in the world“ unterstützen? Bewirb dich jetzt, ganz einfach online. Wir freuen uns auf dich!NIKE, Inc. is a growth company that looks for team members to grow with it. Nike offers a generous total rewards package, casual work environment, a diverse and inclusive culture, and an electric atmosphere for professional development. No matter the location, or the role, every Nike employee shares one galvanizing mission: To bring inspiration and innovation to every athlete* in the world.NIKE, Inc. is committed to employing a diverse workforce. Qualified applicants will receive consideration without regard to race, color, religion, sex, national origin, age, sexual orientation, gender identity, gender expression, veteran status, or disability.How We HireAt NIKE, Inc. we promise to provide a premium, inclusive, compelling and authentic candidate experience. Delivering on this promise means we allow you to be at your best — and to do that, you need to understand how the hiring process works. Transparency is key.\n", "\n", "* This overview explains our hiring process for corporate roles. Note there may be different hiring steps involved for non-corporate roles.Start nowBenefitsWhether it’s transportation or financial health, we continually invest in our employees to help them achieve greatness — inside and outside of work. All who work here should be able to realize their full potential.Employee Assistance ProgramHolidaysMedical PlanPaid Time Off (PTO)Product DiscountsLearn moreFIND A STOREBECOME A MEMBERSIGN UP FOR EMAILSEND US FEEDBACKSTUDENT DISCOUNTSGET HELPGET HELPOrder StatusDeliveryReturnsPayment OptionsContact Us On Nike.com InquiriesContact Us On All Other InquiriesABOUT NIKEABOUT NIKENewsCareersInvestorsSustainabilityIndia© 2024 Nike, Inc. All Rights ReservedGuidesNike AdaptNike Air MaxNike FlyleatherNike PegasusNike Zoom FlyNike AirNike FlyEaseNike FreeNike ReactNike ZoomXNike Air Force 1Nike FlyknitNike JoyrideNike VaporflyTerms of SaleTerms of UseNike Privacy Policy\n" ] } ], "source": [ "from langchain_community.document_loaders import WebBaseLoader\n", "\n", "loader = WebBaseLoader(\"https://jobs.nike.com/job/R-20370?\")\n", "page_data = loader.load().pop().page_content\n", "print(page_data)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "str" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from langchain_core.prompts import PromptTemplate\n", "\n", "prompt_extract = PromptTemplate.from_template(\n", " \"\"\"\n", " ### SCRAPED TEXT FROM WEBSITE:\n", " {page_data}\n", " ### INSTRUCTION:\n", " The scraped text is from the career's page of a website.\n", " Your job is to extract the job postings and return them in JSON format containing the \n", " following keys: `role`, `experience`, `skills` and `description`.\n", " Only return the valid JSON.\n", " ### VALID JSON (NO PREAMBLE): \n", " \"\"\"\n", ")\n", "\n", "chain_extract = prompt_extract | llm \n", "res = chain_extract.invoke(input={'page_data':page_data})\n", "type(res.content)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'role': 'Auszubildende/r 2024 im Einzelhandel',\n", " 'experience': 'No specific experience required',\n", " 'skills': ['Passion for NIKE and/or love for sports',\n", " 'Competence for excellent customer service',\n", " 'Good German and English skills',\n", " 'Good communication and teamwork skills',\n", " 'Proactivity, openness, motivation, and passion for putting customers first'],\n", " 'description': \"As an Auszubildende/r, you will be responsible for creating a unique brand experience for our customers through excellent customer service and product knowledge. You will support various areas of the store, recommend products to customers, and use your knowledge of digital devices to connect online and offline sales and services. You will also learn about Nike's supply chain and retail processes, develop quality assurance measures, and be a brand ambassador for NIKE initiatives.\"}" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from langchain_core.output_parsers import JsonOutputParser\n", "\n", "json_parser = JsonOutputParser()\n", "json_res = json_parser.parse(res.content)\n", "json_res" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "dict" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(json_res)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
TechstackLinks
0React, Node.js, MongoDBhttps://example.com/react-portfolio
1Angular,.NET, SQL Serverhttps://example.com/angular-portfolio
2Vue.js, Ruby on Rails, PostgreSQLhttps://example.com/vue-portfolio
3Python, Django, MySQLhttps://example.com/python-portfolio
4Java, Spring Boot, Oraclehttps://example.com/java-portfolio
5Flutter, Firebase, GraphQLhttps://example.com/flutter-portfolio
6WordPress, PHP, MySQLhttps://example.com/wordpress-portfolio
7Magento, PHP, MySQLhttps://example.com/magento-portfolio
8React Native, Node.js, MongoDBhttps://example.com/react-native-portfolio
9iOS, Swift, Core Datahttps://example.com/ios-portfolio
10Android, Java, Room Persistencehttps://example.com/android-portfolio
11Kotlin, Android, Firebasehttps://example.com/kotlin-android-portfolio
12Android TV, Kotlin, Android NDKhttps://example.com/android-tv-portfolio
13iOS, Swift, ARKithttps://example.com/ios-ar-portfolio
14Cross-platform, Xamarin, Azurehttps://example.com/xamarin-portfolio
15Backend, Kotlin, Spring Boothttps://example.com/kotlin-backend-portfolio
16Frontend, TypeScript, Angularhttps://example.com/typescript-frontend-portfolio
17Full-stack, JavaScript, Express.jshttps://example.com/full-stack-js-portfolio
18Machine Learning, Python, TensorFlowhttps://example.com/ml-python-portfolio
19DevOps, Jenkins, Dockerhttps://example.com/devops-portfolio
\n", "
" ], "text/plain": [ " Techstack \\\n", "0 React, Node.js, MongoDB \n", "1 Angular,.NET, SQL Server \n", "2 Vue.js, Ruby on Rails, PostgreSQL \n", "3 Python, Django, MySQL \n", "4 Java, Spring Boot, Oracle \n", "5 Flutter, Firebase, GraphQL \n", "6 WordPress, PHP, MySQL \n", "7 Magento, PHP, MySQL \n", "8 React Native, Node.js, MongoDB \n", "9 iOS, Swift, Core Data \n", "10 Android, Java, Room Persistence \n", "11 Kotlin, Android, Firebase \n", "12 Android TV, Kotlin, Android NDK \n", "13 iOS, Swift, ARKit \n", "14 Cross-platform, Xamarin, Azure \n", "15 Backend, Kotlin, Spring Boot \n", "16 Frontend, TypeScript, Angular \n", "17 Full-stack, JavaScript, Express.js \n", "18 Machine Learning, Python, TensorFlow \n", "19 DevOps, Jenkins, Docker \n", "\n", " Links \n", "0 https://example.com/react-portfolio \n", "1 https://example.com/angular-portfolio \n", "2 https://example.com/vue-portfolio \n", "3 https://example.com/python-portfolio \n", "4 https://example.com/java-portfolio \n", "5 https://example.com/flutter-portfolio \n", "6 https://example.com/wordpress-portfolio \n", "7 https://example.com/magento-portfolio \n", "8 https://example.com/react-native-portfolio \n", "9 https://example.com/ios-portfolio \n", "10 https://example.com/android-portfolio \n", "11 https://example.com/kotlin-android-portfolio \n", "12 https://example.com/android-tv-portfolio \n", "13 https://example.com/ios-ar-portfolio \n", "14 https://example.com/xamarin-portfolio \n", "15 https://example.com/kotlin-backend-portfolio \n", "16 https://example.com/typescript-frontend-portfolio \n", "17 https://example.com/full-stack-js-portfolio \n", "18 https://example.com/ml-python-portfolio \n", "19 https://example.com/devops-portfolio " ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "\n", "df = pd.read_csv(\"my_portfolio.csv\")\n", "df" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "import uuid\n", "import chromadb\n", "\n", "client = chromadb.PersistentClient('vectorstore')\n", "collection = client.get_or_create_collection(name=\"portfolio\")\n", "\n", "if not collection.count():\n", " for _, row in df.iterrows():\n", " collection.add(documents=row[\"Techstack\"],\n", " metadatas={\"links\": row[\"Links\"]},\n", " ids=[str(uuid.uuid4())])" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['Passion for NIKE and/or love for sports',\n", " 'Competence for excellent customer service',\n", " 'Good German and English skills',\n", " 'Good communication and teamwork skills',\n", " 'Proactivity, openness, motivation, and passion for putting customers first']" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job = json_res\n", "job['skills']" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[[{'links': 'https://example.com/java-portfolio'},\n", " {'links': 'https://example.com/magento-portfolio'}],\n", " [{'links': 'https://example.com/magento-portfolio'},\n", " {'links': 'https://example.com/ml-python-portfolio'}],\n", " [{'links': 'https://example.com/ml-python-portfolio'},\n", " {'links': 'https://example.com/ios-ar-portfolio'}],\n", " [{'links': 'https://example.com/ml-python-portfolio'},\n", " {'links': 'https://example.com/python-portfolio'}],\n", " [{'links': 'https://example.com/magento-portfolio'},\n", " {'links': 'https://example.com/android-portfolio'}]]" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "links = collection.query(query_texts=job['skills'], n_results=2).get('metadatas', [])\n", "links" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'role': 'Auszubildende/r 2024 im Einzelhandel',\n", " 'experience': 'No specific experience required',\n", " 'skills': ['Passion for NIKE and/or love for sports',\n", " 'Competence for excellent customer service',\n", " 'Good German and English skills',\n", " 'Good communication and teamwork skills',\n", " 'Proactivity, openness, motivation, and passion for putting customers first'],\n", " 'description': \"As an Auszubildende/r, you will be responsible for creating a unique brand experience for our customers through excellent customer service and product knowledge. You will support various areas of the store, recommend products to customers, and use your knowledge of digital devices to connect online and offline sales and services. You will also learn about Nike's supply chain and retail processes, develop quality assurance measures, and be a brand ambassador for NIKE initiatives.\"}" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Subject: Enhance Your Retail Experience with AtliQ's Automation Solutions\n", "\n", "Dear Hiring Manager,\n", "\n", "I came across the job description for Auszubildende/r 2024 im Einzelhandel at NIKE, and I was impressed by the emphasis on creating a unique brand experience through excellent customer service and product knowledge. As a Business Development Executive at AtliQ, I believe our company can help NIKE achieve this goal by streamlining retail processes and enhancing the overall customer experience.\n", "\n", "At AtliQ, we specialize in developing tailored automation solutions that facilitate the seamless integration of business processes. Our expertise in Java, Magento, and Python can help optimize supply chain management, improve quality assurance measures, and enhance the brand's online and offline presence.\n", "\n", "Our portfolio showcases our capabilities in developing scalable and efficient solutions for various industries, including retail. Some of our notable projects include:\n", "\n", "* Magento-based e-commerce solutions for seamless online shopping experiences (https://example.com/magento-portfolio)\n", "* Machine Learning and Python-based solutions for predictive analytics and process optimization (https://example.com/ml-python-portfolio)\n", "\n", "By partnering with AtliQ, NIKE can leverage our expertise to:\n", "\n", "* Develop customized automation solutions for retail processes\n", "* Enhance customer experience through data-driven insights\n", "* Improve supply chain management and quality assurance measures\n", "* Increase efficiency and reduce costs through process optimization\n", "\n", "I would be delighted to discuss how AtliQ can help NIKE achieve its goals and enhance the retail experience for its customers. Please feel free to contact me to schedule a call.\n", "\n", "Best regards,\n", "\n", "Mohan\n", "Business Development Executive\n", "AtliQ\n" ] } ], "source": [ "prompt_email = PromptTemplate.from_template(\n", " \"\"\"\n", " ### JOB DESCRIPTION:\n", " {job_description}\n", " \n", " ### INSTRUCTION:\n", " You are Mohan, a business development executive at AtliQ. AtliQ is an AI & Software Consulting company dedicated to facilitating\n", " the seamless integration of business processes through automated tools. \n", " Over our experience, we have empowered numerous enterprises with tailored solutions, fostering scalability, \n", " process optimization, cost reduction, and heightened overall efficiency. \n", " Your job is to write a cold email to the client regarding the job mentioned above describing the capability of AtliQ \n", " in fulfilling their needs.\n", " Also add the most relevant ones from the following links to showcase Atliq's portfolio: {link_list}\n", " Remember you are Mohan, BDE at AtliQ. \n", " Do not provide a preamble.\n", " ### EMAIL (NO PREAMBLE):\n", " \n", " \"\"\"\n", " )\n", "\n", "chain_email = prompt_email | llm\n", "res = chain_email.invoke({\"job_description\": str(job), \"link_list\": links})\n", "print(res.content)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 2 }