Introduction: Solvent bar microextraction technique is a sample preparation method prior to analysis for complicated matrices such as urine, blood, stem cell culture, and wastewater. This method, when coupled with adaptive-network-based fuzzy inference system, can detect and predict the concentration of trace elements and drugs at ultra-trace levels in complicated matrices.Material and method: Rizatriptan was used as a model drug for validation of this method. Therefore, six parameters (pH of donor and acceptor phase, stirring rate, time, temperature, and salt addition) affecting the preconcentration and determination of this drug were investigated. In this method, pH gradient was applied to transfer the drug into the solvent bar. MATLAB version 2010 was used for data analysis. Construction of an input-output mapping was done based on the results obtained from the experiments. For the simulation, the ANFIS architecture was employed to model nonlinear functions, identify nonlinear components in a control system, and predict a chaotic time series, all yielding remarkable results. Based on the best model chosen, the drug was preconcentrated and analyzed under the optimum condition.Results and discussion: The figures of merit were as follows: preconcentration factor: 127; limit of detection: 15ngmL(-1); limit of quantification: 50ngmL(-1); R-2:0.999; RSD: 3.0%(interday) and 4.6% interaday. As a result, this method can be employed for preconcentration and microextraction of several elements, drugs, antibodies at trace levels in complicated matrices. After modeling, the optimum condition could be predicted without performing unnecessary and expensive experiments.Conclusion: Certain biomarkers can also be preconcentrated and detected using the proposed method. It offers high sample clean up, therefore it can be used for clean validation. Prediction of the course of treatment may be possible with the proposed method, therefore it is highly practical, easy and cost-effective. [GRAPHICS] .