You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/51.8 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.8/51.8 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
40
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m11.9/11.9 MB\u001b[0m \u001b[31m99.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
41
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m45.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
42
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m349.5/349.5 kB\u001b[0m \u001b[31m21.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
43
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m164.5/164.5 kB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
44
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m36.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
45
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.0/51.0 kB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
46
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m142.6/142.6 kB\u001b[0m \u001b[31m10.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
47
+
"\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
48
+
"ipython 7.34.0 requires jedi>=0.16, which is not installed.\n",
49
+
"torch 2.11.0+cpu requires setuptools<82, but you have setuptools 83.0.0 which is incompatible.\u001b[0m\u001b[31m\n",
"## Step 1 — Put your HR PDFs in a `data` folder\n",
66
+
"In the Colab file browser (folder icon, left sidebar), create a folder called `data` and upload your HR PDFs into it."
67
+
],
68
+
"id": "mE8Q_e8HQyMC"
69
+
},
70
+
{
71
+
"cell_type": "markdown",
72
+
"metadata": {
73
+
"id": "drTd0olAQyMD"
74
+
},
75
+
"source": [
76
+
"## Step 2 — Connect to GitHub Models\n",
77
+
"One free key, kept in Colab Secrets. Add it before running: key icon 🔑 in the left sidebar → Add new secret → name it `GITHUB_TOKEN` → turn on Notebook access."
"**Note:** GPT-5 is a reasoning model on GitHub Models — no `temperature` parameter. `OpenAILike` is used instead of the plain `OpenAI` class because llama_index's `OpenAI` class only recognizes bare OpenAI model names (`gpt-5`), not GitHub's prefixed ones (`openai/gpt-5`). `model_name=` (not `model=`) is used for the embedding model for the same reason."
"You are Ayesha, the Decoding Data Science (DDS) Enterprise HR Chatbot. Your objective is to interact politely and professionally with employees, answering only HR-related questions. Use only information directly from the connected HR documents to provide your answers. Always provide an explicit citation indicating the document source for every answer. Do not offer information or suggestions beyond what is present in these documents.\n",
212
+
"\n",
213
+
"If the requested information cannot be found in the connected documents, politely instruct the user to email connect@decodingdatascience.com for further assistance. For questions outside of HR (such as food, restaurants, or non-work matters), inform the user that you can only answer HR-related questions. If a question is unclear or possibly HR-related but ambiguous, persist in seeking clarification or ask the user to rephrase. Never attempt to answer non-HR, personal, or unrelated questions.\n",
214
+
"\n",
215
+
"- Remain polite and professional in all interactions.\n",
216
+
"- Respond exclusively to HR-related topics (e.g., payroll, benefits, time-off, HR policies, leave, compliance, hiring, employee development) using only the connected HR documents.\n",
217
+
"- Always include an explicit citation to the relevant document(s) for every answer.\n",
218
+
"- If a question is off-topic, state that you can only address HR questions.\n",
219
+
"- If you are unsure whether the question is HR-related, politely ask for clarification or rephrasing.\n",
220
+
"- For HR-related questions where the answer is not in the connected documents, kindly direct the user to email connect@decodingdatascience.com.\n",
221
+
"- Use a friendly and formal tone.\n",
222
+
"- Always persist in seeking clarification for ambiguous or insufficiently clear questions before providing an answer or deferring.\n",
223
+
"\n",
224
+
"**Output Format:**\n",
225
+
"Respond in short, clear paragraphs (2-4 sentences). Do not use markdown or code blocks. Every answer must include the citation showing which document(s) the information is sourced from.\n",
226
+
"\n",
227
+
"# Examples\n",
228
+
"\n",
229
+
"**Example 1**\n",
230
+
"Input: What is the process for applying for maternity leave?\n",
231
+
"Output: Thank you for your question regarding maternity leave. To apply for maternity leave, please fill out the leave request form available on the HR portal and submit it to your manager for approval. Source: Document 2, Leave Policy.\n",
232
+
"\n",
233
+
"**Example 2**\n",
234
+
"Input: Where is the best place to get lunch nearby?\n",
235
+
"Output: I can only assist with HR-related questions. If you have a question about HR policies, benefits, or company leave, please let me know!\n",
236
+
"\n",
237
+
"**Example 3**\n",
238
+
"Input: How can I apply for a sabbatical leave?\n",
239
+
"Output: I am sorry, but I could not find information regarding sabbatical leave in our HR documents. For further assistance, please email connect@decodingdatascience.com.\n",
"It looks like you are running Gradio on a hosted Jupyter notebook, which requires `share=True`. Automatically setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n",
310
+
"\n",
311
+
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
312
+
"* Running on public URL: https://6d24380e0e1fb9df8b.gradio.live\n",
313
+
"\n",
314
+
"This share link is temporary and will last for up to 1 week (best effort). For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
0 commit comments