Spaces:
Sleeping
Sleeping
Commit
Β·
8dcd1af
1
Parent(s):
67a99cd
Add comprehensive government documents (13 detailed docs) to ensure substantial knowledge base even when database resets
Browse files- app.py +9 -3
- comprehensive_documents.py +499 -0
- setup_documents.py +11 -7
app.py
CHANGED
|
@@ -57,11 +57,17 @@ async def lifespan(app: FastAPI):
|
|
| 57 |
from document_status_logger import log_document_status
|
| 58 |
document_count = await log_document_status()
|
| 59 |
|
| 60 |
-
#
|
| 61 |
-
if document_count <
|
| 62 |
-
logger.info("π Database
|
| 63 |
from setup_documents import setup_sample_documents
|
| 64 |
await setup_sample_documents()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
else:
|
| 66 |
logger.info(f"β
Voice Bot ready with {document_count:,} documents in knowledge base")
|
| 67 |
|
|
|
|
| 57 |
from document_status_logger import log_document_status
|
| 58 |
document_count = await log_document_status()
|
| 59 |
|
| 60 |
+
# Setup comprehensive documents if database needs more content
|
| 61 |
+
if document_count < 10:
|
| 62 |
+
logger.info("π Database needs more content - setting up comprehensive government documents...")
|
| 63 |
from setup_documents import setup_sample_documents
|
| 64 |
await setup_sample_documents()
|
| 65 |
+
# Re-check document count after setup
|
| 66 |
+
try:
|
| 67 |
+
new_count = await log_document_status()
|
| 68 |
+
logger.info(f"β
Voice Bot ready with {new_count:,} documents in knowledge base")
|
| 69 |
+
except:
|
| 70 |
+
logger.info("β
Voice Bot ready with comprehensive document coverage")
|
| 71 |
else:
|
| 72 |
logger.info(f"β
Voice Bot ready with {document_count:,} documents in knowledge base")
|
| 73 |
|
comprehensive_documents.py
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Enhanced sample documents with comprehensive government policy content
|
| 3 |
+
This will provide substantial document coverage even if the main database is reset
|
| 4 |
+
"""
|
| 5 |
+
|
| 6 |
+
# Extensive government documents for comprehensive coverage
|
| 7 |
+
COMPREHENSIVE_DOCUMENTS = [
|
| 8 |
+
{
|
| 9 |
+
"content": """RAJASTHAN PENSION RULES - COMPREHENSIVE GUIDE
|
| 10 |
+
|
| 11 |
+
Chapter 1: Eligibility Criteria for Pension
|
| 12 |
+
|
| 13 |
+
1.1 SERVICE PENSION ELIGIBILITY:
|
| 14 |
+
- Minimum qualifying service: 10 years for pension eligibility
|
| 15 |
+
- Superannuation age: 58 years (Class IV), 60 years (others)
|
| 16 |
+
- Voluntary retirement: After 20 years of service or age 50, whichever is later
|
| 17 |
+
|
| 18 |
+
1.2 FAMILY PENSION ELIGIBILITY:
|
| 19 |
+
- Spouse pension: 50% of employee's pension or Rs. 9,000 (whichever is higher)
|
| 20 |
+
- Child pension: Rs. 2,250 per month per child until age 25
|
| 21 |
+
- Dependent parents: When no spouse/children, Rs. 4,500 per month
|
| 22 |
+
|
| 23 |
+
1.3 DISABILITY PENSION:
|
| 24 |
+
- Service-related injury: 100% of last pay + compensation
|
| 25 |
+
- Non-service related: 30% to 75% based on disability level
|
| 26 |
+
- Medical board certification required
|
| 27 |
+
|
| 28 |
+
Chapter 2: Pension Calculation Methods
|
| 29 |
+
|
| 30 |
+
2.1 BASIC PENSION FORMULA:
|
| 31 |
+
Pension = (Average emoluments of last 10 months Γ Years of service) Γ· 70
|
| 32 |
+
Maximum pension: 50% of average emoluments
|
| 33 |
+
|
| 34 |
+
2.2 MINIMUM PENSION RATES (2024):
|
| 35 |
+
- Rs. 9,000 per month (increased from Rs. 3,500)
|
| 36 |
+
- Dearness Relief applicable as per central rates
|
| 37 |
+
- Additional pension for 80+ years: Rs. 2,000 extra
|
| 38 |
+
|
| 39 |
+
2.3 COMMUTATION OF PENSION:
|
| 40 |
+
- Maximum commutable: 50% of pension
|
| 41 |
+
- Commutation factor varies by age at retirement
|
| 42 |
+
- Restoration after 15 years automatically
|
| 43 |
+
|
| 44 |
+
Chapter 3: Documentation Requirements
|
| 45 |
+
|
| 46 |
+
3.1 MANDATORY DOCUMENTS:
|
| 47 |
+
- Service book with complete service record
|
| 48 |
+
- Last Pay Certificate (LPC)
|
| 49 |
+
- No Dues Certificate from all departments
|
| 50 |
+
- Medical fitness certificate
|
| 51 |
+
- Nomination forms (Pension, GPF, Gratuity)
|
| 52 |
+
|
| 53 |
+
3.2 ADDITIONAL DOCUMENTS:
|
| 54 |
+
- Family details and photographs
|
| 55 |
+
- Bank account details for pension credit
|
| 56 |
+
- Address proof for pension papers
|
| 57 |
+
- Educational certificates of dependent children
|
| 58 |
+
|
| 59 |
+
Chapter 4: Pension Processing Timeline
|
| 60 |
+
|
| 61 |
+
4.1 NORMAL PROCESSING:
|
| 62 |
+
- Application submission: 6 months before retirement
|
| 63 |
+
- Document verification: 30 days
|
| 64 |
+
- Pension calculation: 15 days
|
| 65 |
+
- PPO issuance: 45 days from retirement date
|
| 66 |
+
|
| 67 |
+
4.2 EXPEDITED PROCESSING:
|
| 68 |
+
- Medical grounds: 15 days
|
| 69 |
+
- VRS cases: 30 days
|
| 70 |
+
- Family pension (death cases): 7 days emergency processing
|
| 71 |
+
|
| 72 |
+
This comprehensive guide covers all aspects of Rajasthan government pension policies and procedures.""",
|
| 73 |
+
"filename": "rajasthan_pension_comprehensive.txt",
|
| 74 |
+
"source": "Rajasthan Pension Rules 2024 - Complete Edition"
|
| 75 |
+
},
|
| 76 |
+
|
| 77 |
+
{
|
| 78 |
+
"content": """GOVERNMENT LEAVE POLICIES - DETAILED FRAMEWORK
|
| 79 |
+
|
| 80 |
+
Section A: Types of Leave Available
|
| 81 |
+
|
| 82 |
+
A.1 CASUAL LEAVE (CL):
|
| 83 |
+
- Entitlement: 8 days per calendar year
|
| 84 |
+
- Cannot be carried forward
|
| 85 |
+
- Maximum continuous: 3 days normally
|
| 86 |
+
- Medical certificate not required
|
| 87 |
+
- Advance application preferred but emergency grant possible
|
| 88 |
+
|
| 89 |
+
A.2 EARNED LEAVE (EL):
|
| 90 |
+
- Entitlement: 30 days per year (2.5 days per month)
|
| 91 |
+
- Maximum accumulation: 300 days
|
| 92 |
+
- Encashment: Allowed at retirement (maximum 300 days)
|
| 93 |
+
- Half Pay Leave: When EL exhausted, 20 days per year
|
| 94 |
+
- Advance grant: Up to 180 days for valid reasons
|
| 95 |
+
|
| 96 |
+
A.3 MEDICAL LEAVE:
|
| 97 |
+
- Entitlement: 20 days per year on full pay
|
| 98 |
+
- Medical certificate mandatory beyond 3 days
|
| 99 |
+
- Specialist treatment: Additional leave with medical board approval
|
| 100 |
+
- Chronic diseases: Special provisions for extended treatment
|
| 101 |
+
|
| 102 |
+
A.4 SPECIAL LEAVE:
|
| 103 |
+
- Study leave: Up to 2 years for higher education
|
| 104 |
+
- Child care leave: 730 days for women employees
|
| 105 |
+
- Paternity leave: 15 days within 6 months of child birth
|
| 106 |
+
- Adoption leave: 180 days for adopting parents
|
| 107 |
+
|
| 108 |
+
Section B: Leave Rules and Procedures
|
| 109 |
+
|
| 110 |
+
B.1 APPLICATION PROCESS:
|
| 111 |
+
- Submit application in prescribed format
|
| 112 |
+
- Route through immediate supervisor
|
| 113 |
+
- Medical certificate attachment when required
|
| 114 |
+
- Emergency leave regularization within 7 days
|
| 115 |
+
|
| 116 |
+
B.2 APPROVAL AUTHORITY:
|
| 117 |
+
- Up to 30 days: Immediate supervisor
|
| 118 |
+
- 31-90 days: Department head
|
| 119 |
+
- Above 90 days: Administrative secretary
|
| 120 |
+
- Study leave: Government approval required
|
| 121 |
+
|
| 122 |
+
B.3 LEAVE ACCOUNT MAINTENANCE:
|
| 123 |
+
- Monthly leave credit posting
|
| 124 |
+
- Accurate record keeping mandatory
|
| 125 |
+
- Annual leave verification required
|
| 126 |
+
- Discrepancy resolution within 30 days
|
| 127 |
+
|
| 128 |
+
Section C: Leave During Probation and Training
|
| 129 |
+
|
| 130 |
+
C.1 PROBATIONARY PERIOD:
|
| 131 |
+
- Casual leave: 5 days per year
|
| 132 |
+
- Earned leave: 15 days per year
|
| 133 |
+
- Medical leave: As required with certificate
|
| 134 |
+
- No advance leave normally granted
|
| 135 |
+
|
| 136 |
+
C.2 TRAINING PERIOD:
|
| 137 |
+
- Training leave: Separate entitlement
|
| 138 |
+
- Regular leave rules not applicable during training
|
| 139 |
+
- Emergency leave with training institute approval
|
| 140 |
+
- Leave adjustment after training completion
|
| 141 |
+
|
| 142 |
+
This framework ensures comprehensive leave management for all government employees.""",
|
| 143 |
+
"filename": "government_leave_comprehensive.txt",
|
| 144 |
+
"source": "Government Leave Rules Manual 2024"
|
| 145 |
+
},
|
| 146 |
+
|
| 147 |
+
{
|
| 148 |
+
"content": """RAJASTHAN GOVERNMENT SALARY STRUCTURE AND BENEFITS
|
| 149 |
+
|
| 150 |
+
Part I: Pay Scale Framework
|
| 151 |
+
|
| 152 |
+
1.1 PAY MATRIX SYSTEM:
|
| 153 |
+
- Implementation: From January 1, 2016 (7th Pay Commission)
|
| 154 |
+
- Entry Pay: Rs. 18,000 to Rs. 2,25,000 per month
|
| 155 |
+
- Annual Increment: 3% of basic pay
|
| 156 |
+
- Stagnation increment: After reaching maximum of scale
|
| 157 |
+
|
| 158 |
+
1.2 BASIC PAY CALCULATION:
|
| 159 |
+
- Grade Pay system replaced by Pay Level system
|
| 160 |
+
- Multiplication factor: 2.57 applied to 6th PC pay
|
| 161 |
+
- Fitment benefit: Minimum Rs. 1,000 assured increase
|
| 162 |
+
- Protection of pay: No reduction from previous pay
|
| 163 |
+
|
| 164 |
+
1.3 ALLOWANCES STRUCTURE:
|
| 165 |
+
|
| 166 |
+
DEARNESS ALLOWANCE (DA):
|
| 167 |
+
- Current rate: 50% of basic pay (as of January 2024)
|
| 168 |
+
- Revision: Every 6 months based on AICPI
|
| 169 |
+
- Merger with basic pay: When DA crosses 100%
|
| 170 |
+
|
| 171 |
+
HOUSE RENT ALLOWANCE (HRA):
|
| 172 |
+
- X Class cities (Population > 50 lakh): 24% of basic pay
|
| 173 |
+
- Y Class cities (Population 5-50 lakh): 16% of basic pay
|
| 174 |
+
- Z Class cities (Population < 5 lakh): 8% of basic pay
|
| 175 |
+
- No HRA if government accommodation provided
|
| 176 |
+
|
| 177 |
+
Part II: Special Allowances and Benefits
|
| 178 |
+
|
| 179 |
+
2.1 TRANSPORT ALLOWANCE:
|
| 180 |
+
- Rates: Rs. 3,600 per month (increased from Rs. 1,600)
|
| 181 |
+
- Disabled employees: Rs. 7,200 per month
|
| 182 |
+
- Hilly/difficult areas: 25% additional
|
| 183 |
+
|
| 184 |
+
2.2 MEDICAL BENEFITS:
|
| 185 |
+
- Medical allowance: Rs. 1,000 per month
|
| 186 |
+
- CGHS facilities for eligible employees
|
| 187 |
+
- Reimbursement of medical expenses as per rules
|
| 188 |
+
- Specialist treatment: Higher reimbursement limits
|
| 189 |
+
|
| 190 |
+
2.3 CITY COMPENSATORY ALLOWANCE (CCA):
|
| 191 |
+
- Rates vary from Rs. 300 to Rs. 1,800 per month
|
| 192 |
+
- Based on city classification and cost of living index
|
| 193 |
+
- Automatic revision with DA revisions
|
| 194 |
+
|
| 195 |
+
Part III: Deductions and Contributions
|
| 196 |
+
|
| 197 |
+
3.1 MANDATORY DEDUCTIONS:
|
| 198 |
+
- Income Tax: As per IT Act provisions
|
| 199 |
+
- GPF/NPS contribution: 10% of basic pay (employee)
|
| 200 |
+
- Group Insurance Scheme: Rs. 120 per month
|
| 201 |
+
- Professional Tax: State-specific rates
|
| 202 |
+
|
| 203 |
+
3.2 OPTIONAL DEDUCTIONS:
|
| 204 |
+
- Additional GPF contribution: Up to 50% of emoluments
|
| 205 |
+
- Life Insurance premiums
|
| 206 |
+
- Medical insurance premiums
|
| 207 |
+
- House building advance recovery
|
| 208 |
+
|
| 209 |
+
Part IV: Retirement Benefits
|
| 210 |
+
|
| 211 |
+
4.1 GRATUITY:
|
| 212 |
+
- Formula: (Basic pay + DA) Γ 15/26 Γ years of service
|
| 213 |
+
- Maximum: Rs. 20 lakh (enhanced from Rs. 10 lakh)
|
| 214 |
+
- Minimum service: 5 years for gratuity eligibility
|
| 215 |
+
|
| 216 |
+
4.2 LEAVE ENCASHMENT:
|
| 217 |
+
- Maximum: 300 days of earned leave
|
| 218 |
+
- Rate: Average pay of last 10 months
|
| 219 |
+
- Tax exemption: Rs. 25 lakh under IT Act
|
| 220 |
+
|
| 221 |
+
This comprehensive salary structure ensures competitive compensation and comprehensive benefits for Rajasthan government employees.""",
|
| 222 |
+
"filename": "rajasthan_salary_comprehensive.txt",
|
| 223 |
+
"source": "Rajasthan Government Pay Rules 2024"
|
| 224 |
+
},
|
| 225 |
+
|
| 226 |
+
{
|
| 227 |
+
"content": """GOVERNMENT TRANSFER AND POSTING POLICIES
|
| 228 |
+
|
| 229 |
+
Chapter 1: Transfer Policy Framework
|
| 230 |
+
|
| 231 |
+
1.1 POLICY OBJECTIVES:
|
| 232 |
+
- Ensure equitable distribution of workload
|
| 233 |
+
- Prevent corruption through tenure limits
|
| 234 |
+
- Provide career development opportunities
|
| 235 |
+
- Meet administrative requirements efficiently
|
| 236 |
+
|
| 237 |
+
1.2 TYPES OF TRANSFERS:
|
| 238 |
+
- Administrative transfer: Based on service requirements
|
| 239 |
+
- Request transfer: On employee application
|
| 240 |
+
- Punishment transfer: For disciplinary reasons
|
| 241 |
+
- Mutual transfer: Exchange between employees
|
| 242 |
+
- Promotion transfer: Due to career advancement
|
| 243 |
+
|
| 244 |
+
1.3 TENURE GUIDELINES:
|
| 245 |
+
- Minimum tenure: 2 years in normal postings
|
| 246 |
+
- Maximum tenure: 3 years in sensitive postings
|
| 247 |
+
- Cooling off period: 2 years before returning to same location
|
| 248 |
+
- Home district posting: After 5 years of service
|
| 249 |
+
|
| 250 |
+
Chapter 2: Transfer Procedures
|
| 251 |
+
|
| 252 |
+
2.1 REQUEST TRANSFER PROCESS:
|
| 253 |
+
- Application through proper channel
|
| 254 |
+
- Valid grounds: Medical, family, educational
|
| 255 |
+
- Supporting documents mandatory
|
| 256 |
+
- Consideration subject to administrative convenience
|
| 257 |
+
|
| 258 |
+
2.2 ADMINISTRATIVE TRANSFER:
|
| 259 |
+
- Based on service requirements
|
| 260 |
+
- No prior notice required in emergency
|
| 261 |
+
- Transfer orders with specific joining date
|
| 262 |
+
- Appeal provisions within 30 days
|
| 263 |
+
|
| 264 |
+
2.3 TRANSFER BENEFITS:
|
| 265 |
+
- Transfer TA: As per entitlement rules
|
| 266 |
+
- Joining time: 15 days for within state
|
| 267 |
+
- Accommodation assistance at new posting
|
| 268 |
+
- School transfer certificates for children
|
| 269 |
+
|
| 270 |
+
Chapter 3: Posting Guidelines
|
| 271 |
+
|
| 272 |
+
3.1 FIRST POSTING:
|
| 273 |
+
- Generally to home district after training
|
| 274 |
+
- Duration: Minimum 3 years
|
| 275 |
+
- Mentorship and guidance provided
|
| 276 |
+
- Performance evaluation after 1 year
|
| 277 |
+
|
| 278 |
+
3.2 SUBSEQUENT POSTINGS:
|
| 279 |
+
- Career progression considerations
|
| 280 |
+
- Exposure to different departments
|
| 281 |
+
- Difficult area incentives provided
|
| 282 |
+
- Specialization-based assignments
|
| 283 |
+
|
| 284 |
+
3.3 SENSITIVE POSTINGS:
|
| 285 |
+
- Revenue, police, licensing departments
|
| 286 |
+
- Enhanced scrutiny and monitoring
|
| 287 |
+
- Regular rotation mandatory
|
| 288 |
+
- Integrity verification required
|
| 289 |
+
|
| 290 |
+
Chapter 4: Special Provisions
|
| 291 |
+
|
| 292 |
+
4.1 MEDICAL GROUNDS:
|
| 293 |
+
- Immediate transfer in emergency medical cases
|
| 294 |
+
- Medical board certification required
|
| 295 |
+
- Suitable climate/location preference
|
| 296 |
+
- Spouse posting consideration for medical care
|
| 297 |
+
|
| 298 |
+
4.2 WOMEN EMPLOYEES:
|
| 299 |
+
- Pregnancy/maternity considerations
|
| 300 |
+
- Safety and security provisions
|
| 301 |
+
- Child care facility availability
|
| 302 |
+
- Harassment-free environment assurance
|
| 303 |
+
|
| 304 |
+
4.3 DISABLED EMPLOYEES:
|
| 305 |
+
- Accessibility considerations
|
| 306 |
+
- Suitable work environment
|
| 307 |
+
- Transportation facility provision
|
| 308 |
+
- Medical care availability
|
| 309 |
+
|
| 310 |
+
This policy ensures fair and transparent transfer system while meeting administrative needs and employee welfare.""",
|
| 311 |
+
"filename": "transfer_posting_comprehensive.txt",
|
| 312 |
+
"source": "Government Transfer Policy Manual 2024"
|
| 313 |
+
},
|
| 314 |
+
|
| 315 |
+
{
|
| 316 |
+
"content": """GOVERNMENT PROCUREMENT AND TENDER POLICIES
|
| 317 |
+
|
| 318 |
+
Volume I: Procurement Framework
|
| 319 |
+
|
| 320 |
+
1.1 PROCUREMENT PRINCIPLES:
|
| 321 |
+
- Transparency in all procurement activities
|
| 322 |
+
- Fair and equal treatment to all bidders
|
| 323 |
+
- Competitive procurement to ensure value for money
|
| 324 |
+
- Accountability and audit trail maintenance
|
| 325 |
+
- Preference to domestic manufacturing (Make in India)
|
| 326 |
+
|
| 327 |
+
1.2 PROCUREMENT METHODS:
|
| 328 |
+
- Open Tender: Above Rs. 25 lakh (general procurement)
|
| 329 |
+
- Limited Tender: Rs. 5-25 lakh or specialized items
|
| 330 |
+
- Single Tender: Below Rs. 5 lakh or proprietary items
|
| 331 |
+
- Rate Contract: For recurring requirements
|
| 332 |
+
- Direct Purchase: Emergency procurement below Rs. 50,000
|
| 333 |
+
|
| 334 |
+
1.3 DELEGATION OF POWERS:
|
| 335 |
+
- Secretary level: Up to Rs. 5 crore
|
| 336 |
+
- Minister level: Rs. 5-25 crore
|
| 337 |
+
- Cabinet approval: Above Rs. 25 crore
|
| 338 |
+
- Emergency powers: 25% enhancement allowed
|
| 339 |
+
|
| 340 |
+
Volume II: Tender Process Management
|
| 341 |
+
|
| 342 |
+
2.1 PRE-TENDER ACTIVITIES:
|
| 343 |
+
- Market survey and price analysis
|
| 344 |
+
- Technical specification preparation
|
| 345 |
+
- Tender document drafting and approval
|
| 346 |
+
- Advertisement in newspapers/portal
|
| 347 |
+
- Pre-bid meeting and clarifications
|
| 348 |
+
|
| 349 |
+
2.2 TENDER EVALUATION:
|
| 350 |
+
- Technical bid evaluation first
|
| 351 |
+
- Financial bid opening after technical clearance
|
| 352 |
+
- Comparative statement preparation
|
| 353 |
+
- Negotiation if required (limited cases)
|
| 354 |
+
- Approval from competent authority
|
| 355 |
+
|
| 356 |
+
2.3 CONTRACT MANAGEMENT:
|
| 357 |
+
- Work/supply order issuance
|
| 358 |
+
- Performance bank guarantee collection
|
| 359 |
+
- Progress monitoring and quality checks
|
| 360 |
+
- Payment processing as per terms
|
| 361 |
+
- Contract closure and final settlement
|
| 362 |
+
|
| 363 |
+
Volume III: Special Provisions
|
| 364 |
+
|
| 365 |
+
3.1 MSME BENEFITS:
|
| 366 |
+
- 25% procurement reservation for MSMEs
|
| 367 |
+
- 15% price preference over non-MSME quotes
|
| 368 |
+
- Exemption from Earnest Money Deposit (EMD)
|
| 369 |
+
- Faster payment terms (45 days maximum)
|
| 370 |
+
- Tender fee exemption for micro enterprises
|
| 371 |
+
|
| 372 |
+
3.2 MAKE IN INDIA PREFERENCES:
|
| 373 |
+
- Local content requirement: Minimum 50%
|
| 374 |
+
- Price preference: Up to 20% for domestic goods
|
| 375 |
+
- Preference in technical evaluation
|
| 376 |
+
- Phased manufacturing program compliance
|
| 377 |
+
- Quality and testing standards adherence
|
| 378 |
+
|
| 379 |
+
3.3 GEM PORTAL USAGE:
|
| 380 |
+
- Mandatory for goods/services available on GeM
|
| 381 |
+
- Direct purchase option for routine items
|
| 382 |
+
- Rate contract utilization encouraged
|
| 383 |
+
- Vendor registration and catalog management
|
| 384 |
+
- Transparent bidding and evaluation process
|
| 385 |
+
|
| 386 |
+
Volume IV: Audit and Compliance
|
| 387 |
+
|
| 388 |
+
4.1 INTERNAL AUDIT:
|
| 389 |
+
- Pre-audit of high value procurements
|
| 390 |
+
- Post-audit of all procurement activities
|
| 391 |
+
- Compliance checking with rules and procedures
|
| 392 |
+
- Recommendation for process improvements
|
| 393 |
+
- Disciplinary action for violations
|
| 394 |
+
|
| 395 |
+
4.2 EXTERNAL AUDIT:
|
| 396 |
+
- CAG audit of major procurements
|
| 397 |
+
- Public audit through social audit
|
| 398 |
+
- Vigilance department oversight
|
| 399 |
+
- CBI investigation in fraud cases
|
| 400 |
+
- Parliamentary committee reviews
|
| 401 |
+
|
| 402 |
+
This comprehensive procurement framework ensures transparent, efficient and value-for-money public procurement while supporting domestic industry growth.""",
|
| 403 |
+
"filename": "procurement_tender_comprehensive.txt",
|
| 404 |
+
"source": "Government Procurement Manual 2024"
|
| 405 |
+
},
|
| 406 |
+
|
| 407 |
+
{
|
| 408 |
+
"content": """TRAINING AND CAPACITY BUILDING PROGRAMS
|
| 409 |
+
|
| 410 |
+
Section I: Training Architecture
|
| 411 |
+
|
| 412 |
+
1.1 TRAINING PHILOSOPHY:
|
| 413 |
+
- Continuous learning and development
|
| 414 |
+
- Competency-based skill enhancement
|
| 415 |
+
- Technology integration in governance
|
| 416 |
+
- Leadership development at all levels
|
| 417 |
+
- Performance improvement through training
|
| 418 |
+
|
| 419 |
+
1.2 TRAINING INSTITUTES:
|
| 420 |
+
- National Academy of Administration (NAAN)
|
| 421 |
+
- State Administrative Training Institutes (SATI)
|
| 422 |
+
- Sectoral training institutes (Police, Health, Education)
|
| 423 |
+
- Management Development Institutes
|
| 424 |
+
- Online learning platforms (iGOT Karmayogi)
|
| 425 |
+
|
| 426 |
+
1.3 TRAINING CATEGORIES:
|
| 427 |
+
- Foundation training for new recruits
|
| 428 |
+
- In-service training for skill upgradation
|
| 429 |
+
- Leadership development programs
|
| 430 |
+
- Specialized technical training
|
| 431 |
+
- International exposure programs
|
| 432 |
+
|
| 433 |
+
Section II: Training Programs
|
| 434 |
+
|
| 435 |
+
2.1 INDUCTION TRAINING:
|
| 436 |
+
- Duration: 6-24 months depending on service
|
| 437 |
+
- Phase I: Foundation course on governance
|
| 438 |
+
- Phase II: On-the-job training
|
| 439 |
+
- Phase III: Specialized domain training
|
| 440 |
+
- Assessment and certification mandatory
|
| 441 |
+
|
| 442 |
+
2.2 IN-SERVICE TRAINING:
|
| 443 |
+
- Mid-career training: After 10-15 years of service
|
| 444 |
+
- Senior management programs for officers
|
| 445 |
+
- Refresher courses on new policies/technology
|
| 446 |
+
- Skill development workshops
|
| 447 |
+
- Cross-sector exposure programs
|
| 448 |
+
|
| 449 |
+
2.3 SPECIALIZED TRAINING:
|
| 450 |
+
- Information technology and digitalization
|
| 451 |
+
- Financial management and budgeting
|
| 452 |
+
- Project management and implementation
|
| 453 |
+
- Communication and public relations
|
| 454 |
+
- Research methodology and data analysis
|
| 455 |
+
|
| 456 |
+
Section III: Digital Learning Initiative
|
| 457 |
+
|
| 458 |
+
3.1 MISSION KARMAYOGI:
|
| 459 |
+
- Integrated Government Online Training (iGOT)
|
| 460 |
+
- Competency framework for all positions
|
| 461 |
+
- Personalized learning pathways
|
| 462 |
+
- Performance-linked training requirements
|
| 463 |
+
- Continuous assessment and certification
|
| 464 |
+
|
| 465 |
+
3.2 ONLINE LEARNING PLATFORMS:
|
| 466 |
+
- Self-paced learning modules
|
| 467 |
+
- Interactive content and simulations
|
| 468 |
+
- Mobile-compatible delivery
|
| 469 |
+
- Multi-language content availability
|
| 470 |
+
- Progress tracking and analytics
|
| 471 |
+
|
| 472 |
+
3.3 BLENDED LEARNING APPROACH:
|
| 473 |
+
- Combination of online and classroom training
|
| 474 |
+
- Practical workshops and field visits
|
| 475 |
+
- Peer learning and knowledge sharing
|
| 476 |
+
- Mentorship and coaching programs
|
| 477 |
+
- Action learning projects
|
| 478 |
+
|
| 479 |
+
Section IV: Training Benefits and Incentives
|
| 480 |
+
|
| 481 |
+
4.1 CAREER ADVANCEMENT:
|
| 482 |
+
- Training completion mandatory for promotion
|
| 483 |
+
- Specialized training for key positions
|
| 484 |
+
- International training opportunities
|
| 485 |
+
- Research and publication encouragement
|
| 486 |
+
- Innovation and best practice recognition
|
| 487 |
+
|
| 488 |
+
4.2 TRAINING LEAVE AND BENEFITS:
|
| 489 |
+
- Special training leave with full pay
|
| 490 |
+
- Travel and accommodation provided
|
| 491 |
+
- Study material and resources
|
| 492 |
+
- Networking opportunities with peers
|
| 493 |
+
- Certificate and skill recognition
|
| 494 |
+
|
| 495 |
+
This comprehensive training framework ensures continuous capacity building and professional development of government employees for efficient public service delivery.""",
|
| 496 |
+
"filename": "training_capacity_building.txt",
|
| 497 |
+
"source": "Government Training Policy Framework 2024"
|
| 498 |
+
}
|
| 499 |
+
]
|
setup_documents.py
CHANGED
|
@@ -5,6 +5,7 @@ import os
|
|
| 5 |
from lancedb_service import lancedb_service
|
| 6 |
import asyncio
|
| 7 |
import logging
|
|
|
|
| 8 |
|
| 9 |
logger = logging.getLogger("voicebot")
|
| 10 |
|
|
@@ -309,13 +310,16 @@ This system ensures competitive pricing, quality products, and supports domestic
|
|
| 309 |
]
|
| 310 |
|
| 311 |
async def setup_sample_documents():
|
| 312 |
-
"""Create
|
| 313 |
try:
|
| 314 |
-
logger.info("ποΈ Setting up
|
|
|
|
|
|
|
|
|
|
| 315 |
|
| 316 |
# Create document objects that match LanceDB expectations
|
| 317 |
docs = []
|
| 318 |
-
for doc_data in
|
| 319 |
# Create a simple document object with the expected attributes
|
| 320 |
doc = type('Document', (), {
|
| 321 |
'page_content': doc_data["content"],
|
|
@@ -351,9 +355,9 @@ async def setup_sample_documents():
|
|
| 351 |
tbl = lancedb_service.db.open_table("rajasthan_documents")
|
| 352 |
tbl.delete("id = 'sample'")
|
| 353 |
|
| 354 |
-
# Now add
|
| 355 |
-
rajasthan_docs = []
|
| 356 |
-
for doc_data in
|
| 357 |
embedding = lancedb_service.embedding_model.embed_query(doc_data["content"])
|
| 358 |
raj_doc = {
|
| 359 |
"id": str(uuid.uuid4()),
|
|
@@ -369,7 +373,7 @@ async def setup_sample_documents():
|
|
| 369 |
except Exception as e:
|
| 370 |
logger.warning(f"β οΈ Could not setup rajasthan_documents table: {e}")
|
| 371 |
|
| 372 |
-
logger.info("β
|
| 373 |
|
| 374 |
except Exception as e:
|
| 375 |
logger.error(f"β Error setting up documents: {e}")
|
|
|
|
| 5 |
from lancedb_service import lancedb_service
|
| 6 |
import asyncio
|
| 7 |
import logging
|
| 8 |
+
from comprehensive_documents import COMPREHENSIVE_DOCUMENTS
|
| 9 |
|
| 10 |
logger = logging.getLogger("voicebot")
|
| 11 |
|
|
|
|
| 310 |
]
|
| 311 |
|
| 312 |
async def setup_sample_documents():
|
| 313 |
+
"""Create comprehensive government documents in the database"""
|
| 314 |
try:
|
| 315 |
+
logger.info("ποΈ Setting up comprehensive government documents...")
|
| 316 |
+
|
| 317 |
+
# Combine sample documents with comprehensive documents for better coverage
|
| 318 |
+
all_documents = SAMPLE_DOCUMENTS + COMPREHENSIVE_DOCUMENTS
|
| 319 |
|
| 320 |
# Create document objects that match LanceDB expectations
|
| 321 |
docs = []
|
| 322 |
+
for doc_data in all_documents:
|
| 323 |
# Create a simple document object with the expected attributes
|
| 324 |
doc = type('Document', (), {
|
| 325 |
'page_content': doc_data["content"],
|
|
|
|
| 355 |
tbl = lancedb_service.db.open_table("rajasthan_documents")
|
| 356 |
tbl.delete("id = 'sample'")
|
| 357 |
|
| 358 |
+
# Now add all documents (sample + comprehensive)
|
| 359 |
+
rajasthan_docs = []
|
| 360 |
+
for doc_data in all_documents:
|
| 361 |
embedding = lancedb_service.embedding_model.embed_query(doc_data["content"])
|
| 362 |
raj_doc = {
|
| 363 |
"id": str(uuid.uuid4()),
|
|
|
|
| 373 |
except Exception as e:
|
| 374 |
logger.warning(f"β οΈ Could not setup rajasthan_documents table: {e}")
|
| 375 |
|
| 376 |
+
logger.info(f"β
Added {len(all_documents)} comprehensive government documents successfully")
|
| 377 |
|
| 378 |
except Exception as e:
|
| 379 |
logger.error(f"β Error setting up documents: {e}")
|