<PAGE>
 
                                                                    EXHIBIT 10.5

                             INFERENCE CORPORATION

                         EMPLOYEE STOCK PURCHASE PLAN

                         (as amended January 19, 1999)

1.   DEFINITIONS.

     (a)  "Base Pay" means a Qualified Employee's gross pay for a 40-hour week,
excluding overtime payments, incentive compensation, bonuses, sales commission,
relocation or attributed types of compensation, and other special payments, fees
or allowances.

     (b)  "Board" means the Board of Directors of the Company.
 
     (c)  "Code" means the Internal Revenue Code of 1986, as amended and as it
may hereafter be amended from time to time.

     (d)  "Committee" has the meaning set forth in Section 13 hereof.

     (e)  "Common Stock" means the Class A Common Stock of the Company, no par
value per share.

     (f)  "Company" means Inference Corporation, a California corporation, and
its successors.

     (g)  "Effective Date" means the effective date of this Plan as set forth in
Section 14 of this Plan.

     (h)  "Exchange Act" means the Securities Exchange Act of 1934, as amended,
and as it may hereafter be amended from time to time.

     (i)  "Exercise Date" has the meaning set forth in Section 4(a) hereof.

     (j)  "Fair Market Value" means the closing price of the Common Stock on the
NASDAQ National Market System as reported and published in the Western Edition
of The Wall Street Journal, or if there is no trading of the Common Stock on the
date in question, then the average of the high and low price of the Common
Stock, as so reported and published, on the next preceding date on which there
was trading in the Common Stock; provided, however, that the Committee, in
determining such Fair Market Value, may utilize such other exchange, market or
other factors affecting value of the Common Stock as it may deem appropriate.

     (k)  "Grant Date" has the meaning set forth in Section 4(a) hereof.

     (l)  "Offering Period" has the meaning set forth in Section 4(a) hereof.

     (m)  "Option Price" has the meaning set forth in Section 5(b) hereof.

                                                                             A-1
<PAGE>
 
     (n)  "Participant" means a Qualified Employee who elects to participate in
this Plan during an Offering Period.

     (o)  "Personal Representative" means the person or persons who, upon the
death or Total Disability of a Participant, shall have acquired, on behalf of
the Participant by legal proceeding or under the laws of descent and
distribution or otherwise, the right to exercise the Participant's rights under,
or to receive the benefits specified in, this Plan.

     (p)  "Plan" means this Inference Corporation Employee Stock Purchase Plan,
as it may be amended from time to time.

     (q)  "Plan Year" means the calendar year; provided, however, that the first
Plan Year shall be a short year of 5 months commencing on August 1, 1996 and
ending on December 31, 1996.

     (r)  "Qualified Employee" means any employee of the Company or any
Subsidiary who has completed at least one (1) month of continuous service with
the Company or any Subsidiary as of the Grant Date and who is customarily
employed by the Company or a Subsidiary as of the Grant Date for more than 20
hours per week and more than five months in a calendar year. Notwithstanding the
foregoing, the term "Qualified Employee" does not include any employee who,
immediately after the option is granted, owns (within the meaning of Sections
423(b)(3) and 424(d) of the Code) stock representing 5% or more of the total
combined voting power or value of all classes of stock of the Company or a
Subsidiary.

     (s)  "Retirement" means the voluntary termination of employment of a
Participant who either (i) is at least 55 years of age and has completed at
least ten (10) years of service with the Company or a Subsidiary, or (ii) is at
least 65 years of age.

     (t)  "Subsidiary" means any corporation or other entity, at least a
majority of whose outstanding voting stock or voting power is beneficially owned
directly or indirectly by the Company.

     (u)  "Total Disability" means the total and permanent physical or mental
disability of a Participant, evidenced by an inability to engage in any
substantial gainful activity, as determined by the Committee.

     All references herein to the masculine shall also be references to the
feminine or neuter as appropriate.

2.   PURPOSE, SUMMARY. The purpose of this Plan is to assist Qualified Employees
in acquiring a stock ownership interest in the Company pursuant to a plan which
is intended to qualify as an "employee stock purchase plan" under Section 423 of
the Code. Under this Plan, Participants are deemed to have been granted options
to purchase shares of Common Stock. Participants may designate a certain amount
of their Base Pay to be set aside during the Offering Period for the purpose of
purchasing Common Stock. At the end of the Offering Period, the Participants are
deemed to have exercised their options using the funds set aside for them and
the 

                                                                             A-2
<PAGE>
 
Company issues share certificates to them. The plan is intended, among other
things, to provide an additional incentive to Participants, through the
ownership of Common Stock, to achieve business goals that would increase stock
values and to remain in the employ of the Company or a Subsidiary.

3.   STOCK SUBJECT TO THIS PLAN.  Subject to the provisions of Section 10 hereof
(relating to adjustments upon changes in capitalization), the total number of
shares available under this Plan is 500,000 shares of Common Stock.  Such shares
may be authorized but unissued shares.

4.   GRANT OF OPTIONS.

     (a)  IN GENERAL.  Commencing August 1, 1996 and continuing while this Plan
remains in force, the Company will offer on the first day of each quarter of a
calendar year (and on August 1, 1996) options to purchase shares of Common Stock
under this Plan to all Participants (each a "Grant Date"). The term of each
option ("Offering Period") shall be 3 months (2 months for the third quarter of
the 1996 calendar year), the last day of which shall be the last day of the
calendar quarter in which such option was granted (each an "Exercise Date"). The
number of shares subject to each option and deemed to be purchased by each
Participant shall be the quotient, rounded down to the nearest whole number, of
(i) the aggregate payroll deductions authorized by each Participant in
accordance with Section 4(b) below made during the Offering Period, divided by
(ii) the Option Price. The grant of options hereunder is subject to the approval
of the Plan by the shareholders of the Company. If shareholder approval is not
received by or before August 1, 1996, this Plan shall be deemed to be terminated
and no options shall be granted hereunder.

     (b)  ELECTION TO PARTICIPATE; PAYROLL DEDUCTION AUTHORIZATION.  Except as
provided in Section 4(d) below, a Qualified Employee may participate in this
Plan only by means of payroll deductions. Each Qualified Employee who elects to
participate in this Plan shall deliver to the Company, no later than the 15th
day of the month next preceding a Grant Date (or July 15 for the third quarter
of the 1996 calendar year, or the next business day following such date if such
day is not a business day), a written payroll deduction authorization in a form
approved by the Company pursuant to which he gives notice of his election to
participate in this Plan as of the next following Grant Date, and whereby he
designates a stated amount to be deducted from his Base Pay on each payday
during the next Offering Period and credited to his account under this Plan
("Account"). The stated amount to be deducted from a Participant's Base Pay may
not be less than $10.00 per pay period. The aggregate stated amount for any
Offering Period may not exceed either of the following: (i) ten percent (10%) of
the Participant's Base Pay during the Offering Period; or (ii) an amount which
will result in noncompliance with the $25,000 limitation stated in Section 4(c)
below. Payroll deduction authorizations may not be changed during the Offering
Period. In the event the number of shares of Common Stock subject to options
during an Offering Period exceeds the number of shares then available under this
Plan, the available shares shall be allocated among the Participants in
proportion to the balance of their Accounts at the end of the Offering Period,
and 

                                                                             A-3
<PAGE>
 
any amounts credited to their Accounts after giving effect to shares purchased
that year shall be refunded to the Participants.

     (c)  $25,000 LIMITATION. No Participant shall be deemed to have been
granted options under this Plan which would permit his rights to purchase Common
Stock under this Plan or any other employee stock purchase plan of the Company
or any Subsidiary to accrue at a rate which exceeds $25,000 of Fair Market Value
of Common Stock for any calendar year. For purposes of this subsection (c), the
right to purchase Common Stock under an option accrues when the option (or any
portion thereof) becomes exercisable, and the right to purchase Common Stock
which has accrued during one Offering Period may not be carried over to any
subsequent Offering Period.

     (d)  LEAVES OF ABSENCE. During leaves of absence approved by the Company
and meeting the requirements of Regulation Section 1.421-7(h)(2) under the Code,
a Participant may continue participation in this Plan by making cash payments to
the Company on the Company's normal paydays equal to the reduction in his
payroll deduction attributable to his leave.

5.   EXERCISE OF OPTIONS.

     (a)  IN GENERAL.  On each Exercise Date, each Participant automatically and
without any act on his part will be deemed to have exercised his option to the
extent that the balance then credited to his Account is sufficient to purchase
whole shares of Common Stock at the Option Price. The Company shall promptly
refund to the Participant any balance remaining in his Account, without interest
thereon, after giving effect to the purchase of such whole shares.

     (b)  "OPTION PRICE" DEFINED.  The Option Price per share to be paid by each
Participant upon exercise of his option shall be an amount equal to 85% of the
Fair Market Value of Common Stock on the Grant Date or on the Exercise Date (or
the date of the Participant's Retirement, death or Total Disability if any such
event occurs), whichever amount is less.

     (c)  DELIVERY OF SHARE CERTIFICATES. Subject to Section 5(d) below, the
Company will deliver to each Participant a certificate issued in the
Participant's name for the number of shares with respect to which his option was
exercised. The Company will deliver the certificate as soon as practicable
following the Exercise Date.

     (d)  GOVERNMENT REGULATIONS. This Plan, the granting of options under this
Plan and the issuance of Common Stock pursuant hereto are subject to all
applicable federal and state laws, rules and regulations and to such approvals
by any regulatory or governmental agency which may, in the opinion of counsel
for the Company, be necessary or advisable in connection therewith. Without
limiting the generality of the foregoing, no options may be granted under this
Plan, and no shares may be issued by the Company, unless and until, in each such
case, all legal requirements applicable to the grant or issuance have, in the
opinion of counsel to the Company, been complied with. In connection with the
issuance of Common Stock hereunder, the Participant shall, if requested by the
Company, give assurances satisfactory to counsel to the 

                                                                             A-4
<PAGE>
 
Company in respect of such matters as the Company may deem desirable to assure
compliance with all applicable legal requirements.

6.   WITHDRAWAL FROM THIS PLAN.

     (a)  IN GENERAL. Any Participant may completely withdraw from this Plan at
any time. A Participant who desires to withdraw from this Plan must deliver to
the Company a notice of withdrawal in a form approved by the Company. Promptly
following the time when the notice of withdrawal is delivered, the Company will
refund to the Participant the amount of the balance of his Account, without
interest thereon, and the Participant's payroll deduction authorization,
interest in this Plan and option under this Plan shall thereupon terminate.

     (b)  ELIGIBILITY FOLLOWING WITHDRAWAL. A Participant who has withdrawn from
this Plan shall again be eligible to participate in this Plan upon expiration of
the Offering Period during which the Participant withdrew. 

     (c)  TERMINATION OF EMPLOYMENT. If the employment of a Participant by the
Company or a Subsidiary terminates during an Offering Period for any reason, his
participation in this Plan shall terminate automatically and without any act on
his part as of the date of the termination of the Participant's employment. The
Company promptly will refund to the Participant the amount of the balance of his
Account, without interest thereon, and thereupon his interest in and options
under this Plan shall terminate. Nothing in this Plan shall prevent the Company
or any Subsidiary from terminating any Participant's employment.

7.   RESTRICTION UPON ASSIGNMENT. An option granted under this Plan shall not be
transferable otherwise than by will or the laws of descent and distribution
pursuant to Section 7(c) hereof, and is exercisable during the Participant's
lifetime only by the Participant (or his Personal Representative in the event of
the Participant's Total Disability). The Company will not recognize any
assignment or purported assignment by a Participant of his option or of any
rights under his option or under this Plan.

8.   NO RIGHTS AS SHAREHOLDER. With respect to shares of Common Stock subject to
an option, a Participant shall not be deemed to be a shareholder and shall not
have any of the rights or privileges of a shareholder until a certificate for
shares of Common Stock has been issued to the Participant following the exercise
of his option.

9.   ADJUSTMENTS UPON CHANGES IN CAPITALIZATION, DISSOLUTION, LIQUIDATION,
MERGER OR ASSET SALE.

          (a)  CHANGES IN CAPITALIZATION.  Subject to any required action by the
stockholders of the Company, the number of shares reserved under this Plan, the
price per share and the number of shares of Common Stock covered by each option
under the Plan which has not yet been exercised shall be proportionately
adjusted for any increase or decrease in the number of issued shares of Common
Stock resulting from a stock split, reverse stock split, stock dividend,

                                                                             A-5
<PAGE>
 
combination or reclassification of the Common Stock, or any other increase or
decrease in the number of shares of Common Stock effected without receipt of
consideration by the Company; provided, however, that conversion of any
convertible securities of the Company shall not be deemed to have been "effected
without receipt of consideration".  Such adjustment shall be made by the Board,
whose determination in that respect shall be final, binding and conclusive.
Except as expressly provided herein, no issuance by the Company of shares of
stock of any class, or securities convertible into shares of stock of any class,
shall affect, and no adjustment by reason thereof shall be made with respect to,
the number or price of shares of Common Stock subject to an option.

      (b)  DISSOLUTION OR LIQUIDATION.  In the event of the proposed dissolution
or liquidation of the Company, the Offering Period then in progress shall be
shortened by setting a new Exercise Date (the "New Exercise Date"), and shall
terminate immediately prior to the consummation of such proposed dissolution or
liquidation, unless provided otherwise by the Board.   The New Exercise Date
shall be before the date of the Company's proposed dissolution or liquidation.
The Board shall notify each participant in writing, at least ten (10) business
days prior to the New Exercise Date, that the Exercise Date for the
participant's option has been changed to the New Exercise Date and that the
participant's option shall be exercised automatically on the New Exercise Date,
unless prior to such date the participant has withdrawn from the Offering Period
as provided in Section 6 hereof.

     (c)  MERGER OR ASSET SALE.  In the event of a proposed sale of all or
substantially all of the assets of the Company, or the merger of the Company
with or into another corporation, each outstanding option shall be assumed or an
equivalent option substituted by the successor corporation or a parent or
subsidiary of the successor corporation.  In the event that the successor
corporation refuses to assume or substitute for the option, the Offering Period
then in progress shall be shortened by setting a new Exercise Date (the "New
Exercise Date").   The New Exercise Date shall be before the date of the
Company's proposed sale or merger.  The Board shall notify each participant in
writing, at least ten (10) business days prior to the New Exercise Date, that
the Exercise Date for the participant's option has been changed to the New
Exercise Date and that the participant's option shall be exercised automatically
on the New Exercise Date, unless prior to such date the participant has
withdrawn from the Offering Period as provided in Section 6 hereof.

10.  USE OF FUNDS; NO INTEREST PAID.  All amounts withheld from Participants'
paychecks hereunder and credited to their Accounts will be included in the
general funds of the Company free of any trust or other restriction and may be
used by the Company for any corporate purpose.  Under no circumstances shall
interest on such amounts be paid to any Participant or credited to his Account.

11.  AMENDMENT OF THIS PLAN.  The Board may at any time and for any reason
terminate or amend the Plan.  Except as provided in Section 9 hereof, no such
termination can affect options previously granted, provided that an Offering
Period may be terminated by the Board on any Exercise Date if the Board
determines that the termination of the Offering Period or the Plan is in the
best interests of the Company and its shareholders.  Except as provided in

                                                                             A-6
<PAGE>
 
Section 9 and Section 11 hereof, no amendment may make any change in any option
theretofore granted which adversely affects the rights of any participant.  To
the extent necessary to comply with Section 423 of the Code (or any other
applicable law, regulation or stock exchange rule), the Company shall obtain
shareholder approval in such a manner and to such a degree as required.

     Without shareholder consent and without regard to whether any participant
rights may be considered to have been "adversely affected," the Board (or its
committee) shall be entitled to change the Offering Periods, limit the frequency
and/or number of changes in the amount withheld during an Offering Period,
establish the exchange ratio applicable to amounts withheld in a currency other
than U.S. dollars, permit payroll withholding in excess of the amount designated
by a participant in order to adjust for delays or mistakes in the Company's
processing of properly completed withholding elections, establish reasonable
waiting and adjustment periods and/or accounting and crediting procedures to
ensure that amounts applied toward the purchase of Common Stock for each
participant properly correspond with amounts withheld from the participant's
Base Pay, and establish such other limitations or procedures as the Board (or
its committee) determines in its sole discretion advisable which are consistent
with the Plan.

     In the event the Board determines that the ongoing operation of the Plan
may result in unfavorable financial accounting consequences, the Board may, in
its discretion and, to the extent necessary or desirable, modify or amend the
Plan to reduce or eliminate such accounting consequence including, but not
limited to:

          (a)  altering the Option Price for any Offering Period including an
Offering Period underway at the time of the change in Option Price;

          (b)  shortening any Offering Period so that Offering Period ends on a
new Exercise Date, including an Offering Period underway at the time of the
Board action; and

          (c)  allocating shares.

     Such modifications or amendments shall not require shareholder approval or
the consent of any Plan participants.

     ADMINISTRATION BY COMMITTEE; RULES AND REGULATIONS. The Plan shall be
administered by the Board or a committee of members of the Board appointed by
the Board.  The Board or its committee shall have full and exclusive
discretionary authority to construe, interpret and apply the terms of the Plan,
to determine eligibility and to adjudicate all disputed claims filed under the
Plan.  Every finding, decision and determination made by the Board or its
committee shall, to the full extent permitted by law, be final and binding upon
all parties.

12.  EFFECTIVE DATE.  The Plan shall become effective as of August 1, 1996,
subject to approval by the holders of the majority of the Common Stock present
and represented at a special or annual meeting of the stockholders held prior to
August 1, 1996.

                                                                             A-7
<PAGE>
 
13.  TERM.  No option may be granted during any period of suspension nor after
termination of this Plan, and in no event may any option be granted under this
Plan after the date on which all of the Common Stock available under this Plan
has been purchased.

14.  EFFECT UPON OTHER PLANS.  The adoption of this Plan shall not affect any
other compensation or incentive plans in effect for the Company or any
Subsidiary.  Nothing in this Plan shall be construed to limit the right of the
Company or any Subsidiary (a) to establish any other forms of incentives or
compensation for employees of the Company or any Subsidiary or (b) to grant or
assume options otherwise than under this Plan in connection with any proper
corporate purpose.

15.  HEADINGS.  Headings are provided herein for convenience only and shall not
serve as a basis for interpretation or construction of this Plan.

16.  GOVERNING LAW; SEVERABILITY.  This Plan shall be governed by, and construed
and enforced in accordance with, the laws of the State of California.  If any
provisions shall be held by a court of competent jurisdiction to be invalid and
unenforceable, the remaining provisions of this Plan shall continue to be in
full force and effect.

17.  NO EMPLOYMENT RIGHTS.  The Plan does not, directly or indirectly, create
any right for the benefit of any employee or class of employees to purchase any
shares under the Plan, or create in any employee or class of employees any right
with respect to continuation of employment by the Company, and it shall not be
deemed to interfere in any way with the Company's right to terminate, or
otherwise modify, an Employee's employment at any time.

18.  EFFECT OF PLAN.  The provisions of the Plan shall, in accordance with its
terms, be binding upon, and inure to the benefit of, all successors of each
Employee participating in the Plan, including, without limitation, such
Employee's estate and the executors, administrators or trustees thereof, heirs
and legatees, and any receiver, trustee in bankruptcy or representative of
creditors of such Employee.

     This Plan is adopted February 14, 1996, effective however as of the
Effective Date.

                                 INFERENCE CORPORATION


                                 By:   /s/ Mark A. Wolf
                                       -----------------------------
                                       Mark A. Wolf, Chief
                                       Financial Officer

                                                                             A-8